|
| 1 | +<?php declare(strict_types=1); |
| 2 | + |
| 3 | +$finder = PhpCsFixer\Finder::create() |
| 4 | + ->in(__DIR__ . '/src') |
| 5 | + ->exclude(__DIR__ . '/tests') |
| 6 | +; |
| 7 | + |
| 8 | +return (new PhpCsFixer\Config()) |
| 9 | + ->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers()) |
| 10 | + ->setRiskyAllowed(true) |
| 11 | + ->setRules([ |
| 12 | + '@PSR12' => true, |
| 13 | + '@PSR12:risky' => true, |
| 14 | + '@Symfony' => true, |
| 15 | + '@Symfony:risky' => true, |
| 16 | + 'linebreak_after_opening_tag' => true, |
| 17 | + 'mb_str_functions' => true, |
| 18 | + 'no_php4_constructor' => true, |
| 19 | + 'no_unreachable_default_argument_value' => true, |
| 20 | + 'no_useless_else' => true, |
| 21 | + 'no_useless_return' => true, |
| 22 | + 'php_unit_strict' => true, |
| 23 | + 'phpdoc_order' => true, |
| 24 | + 'strict_comparison' => true, |
| 25 | + 'strict_param' => true, |
| 26 | + 'concat_space' => false, |
| 27 | + 'declare_strict_types' => true, |
| 28 | + 'native_function_invocation' => ['include' => []], |
| 29 | + PhpCsFixerCustomFixers\Fixer\DeclareAfterOpeningTagFixer::name() => true, |
| 30 | + PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer::name() => true, |
| 31 | + PhpCsFixerCustomFixers\Fixer\NoImportFromGlobalNamespaceFixer::name() => true, |
| 32 | + PhpCsFixerCustomFixers\Fixer\PromotedConstructorPropertyFixer::name() => true, |
| 33 | + PhpCsFixerCustomFixers\Fixer\ConstructorEmptyBracesFixer::name() => true, |
| 34 | + PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => true, |
| 35 | + PhpCsFixerCustomFixers\Fixer\NoUselessDoctrineRepositoryCommentFixer::name() => true, |
| 36 | + ]) |
| 37 | + ->setFinder($finder) |
| 38 | +; |
0 commit comments