From 776010995b0e468bd76594c1fea2956504d1aeaf Mon Sep 17 00:00:00 2001 From: Thomas Nabord Date: Mon, 29 Apr 2019 18:10:27 +0100 Subject: [PATCH] Enable php-cs-fixer on the project --- .gitignore | 2 ++ .php_cs.dist | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .php_cs.dist diff --git a/.gitignore b/.gitignore index e7302190e..8c25889e0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ nbproject /tests/E2E/ /vendor/ + +.php_cs.cache \ No newline at end of file diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 000000000..c618b640c --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,36 @@ +in(__DIR__) + ->exclude('translations') + ->notPath('classes/Tools14.php'); + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + 'concat_space' => [ + 'spacing' => 'one', + ], + 'cast_spaces' => [ + 'space' => 'single', + ], + 'error_suppression' => [ + 'mute_deprecation_error' => false, + 'noise_remaining_usages' => false, + 'noise_remaining_usages_exclude' => [], + ], + 'function_to_constant' => false, + 'no_alias_functions' => false, + 'non_printable_character' => false, + 'phpdoc_summary' => false, + 'phpdoc_align' => [ + 'align' => 'left', + ], + 'protected_to_private' => false, + 'psr4' => false, + 'self_accessor' => false, + 'yoda_style' => null, + 'non_printable_character' => true, + ]) + ->setFinder($finder);