From c371392c658dfa0e9a5d76715ba79cf67582f6b3 Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Thu, 23 May 2024 17:42:27 +0200 Subject: [PATCH] feat: php cs fix config #31 --- .php-cs-fixer.dist.php | 7 +++++++ README.md | 17 +++++++++++++++++ config/phpcsfixer-symfony.php | 30 ++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 .php-cs-fixer.dist.php create mode 100644 config/phpcsfixer-symfony.php diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..f5e43ee --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,7 @@ +in(__DIR__) + ->exclude('var') +; + +$fixers = [ +]; + +$fixers = array_merge( + iterator_to_array(new whatwedo\PhpCodingStandard\Fixers()), + iterator_to_array(new PhpCsFixerCustomFixers\Fixers()), +); + +return (new PhpCsFixer\Config()) + ->registerCustomFixers($fixers) + ->setRules([ + '@Symfony' => true, + whatwedo\PhpCodingStandard\Fixer\DumpFixer::name() => true, + PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer::name() => true, + PhpCsFixerCustomFixers\Fixer\NoImportFromGlobalNamespaceFixer::name() => true, + PhpCsFixerCustomFixers\Fixer\NoNullableBooleanTypeFixer::name() => true, + PhpCsFixerCustomFixers\Fixer\NoPhpStormGeneratedCommentFixer::name() => true, + PhpCsFixerCustomFixers\Fixer\PhpdocSelfAccessorFixer::name() => true, + ]) + ->setRiskyAllowed(true) + ->setFinder($finder) + +;