We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0aa68ee commit b80cc7eCopy full SHA for b80cc7e
2 files changed
.php-cs-fixer.dist.php
@@ -0,0 +1,12 @@
1
+<?php
2
+
3
+$finder = PhpCsFixer\Finder::create()
4
+ ->in(__DIR__)
5
+ ->name('*.php');
6
7
+return (new PhpCsFixer\Config())
8
+ ->setRules([
9
+ '@PSR12' => true,
10
+ 'array_syntax' => ['syntax' => 'short'],
11
+ ])
12
+ ->setFinder($finder);
devenv.nix
@@ -6,6 +6,20 @@
{
# https://devenv.sh/git-hooks/
git-hooks.hooks = {
+ php-cs-fixer = {
+ enable = true;
+ entry = pkgs.lib.mkForce "${pkgs.phpPackages."php-cs-fixer"}/bin/php-cs-fixer fix";
+ args = [
13
+ "--config"
14
+ "./.php-cs-fixer.dist.php"
15
+ ];
16
+ language = "system";
17
+ pass_filenames = true;
18
+ require_serial = true;
19
+ stages = [ "pre-commit" ];
20
+ types = [ "php" ];
21
+ };
22
23
# Custom pre-commit hook to format justfile
24
qmlformat = {
25
enable = true;
0 commit comments