diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 9ed0cc408..d720d299c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -4,42 +4,54 @@ ->ignoreVCSIgnored(true) ->in(__DIR__.'/lib') ->in(__DIR__.'/tests') - ->append(array(__FILE__)) + ->append([__FILE__]) // Exclude generated files (single files) ->notPath('should-be-ignored.php') ; $config = new PhpCsFixer\Config(); -$config->setRules(array( +$config->setRules([ '@PhpCsFixer' => true, '@Symfony' => true, - 'array_syntax' => array( - 'syntax' => 'long', - ), - 'method_argument_space' => array( + '@PHP54Migration' => true, + '@PHP56Migration:risky' => true, + '@PHP70Migration' => true, + '@PHP70Migration:risky' => true, + '@PHP71Migration' => true, + '@PHP71Migration:risky' => true, + '@PHP73Migration' => true, + '@PHP74Migration' => true, + '@PHP74Migration:risky' => true, + 'void_return' => false, + 'declare_strict_types' => false, + 'array_syntax' => [ + 'syntax' => 'short', + ], + 'method_argument_space' => [ 'on_multiline' => 'ensure_fully_multiline', - ), - 'general_phpdoc_annotation_remove' => array( - 'annotations' => array('version', 'license', 'since'), - ), + ], + 'general_phpdoc_annotation_remove' => [ + 'annotations' => ['version', 'license', 'since'], + ], 'phpdoc_no_package' => true, - 'phpdoc_separation' => array( - 'groups' => array( - array( + 'phpdoc_separation' => [ + 'groups' => [ + [ 'author', - ), - array( + ], + [ 'deprecated', 'see', - ), - array( + ], + [ 'param', 'return', 'throws', - ), - ), - ), -)) + ], + ], + ], +]) + ->setRiskyAllowed(true) ->setCacheFile('.php-cs-fixer.cache') ->setFinder($finder) ;