|
@@ -0,0 +1,46 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+$header = '/* For licensing terms, see /license.txt */';
|
|
|
+
|
|
|
+$rules = [
|
|
|
+ '@Symfony' => true,
|
|
|
+ '@Symfony:risky' => true,
|
|
|
+ 'array_syntax' => [
|
|
|
+ 'syntax' => 'short',
|
|
|
+ ],
|
|
|
+ 'header_comment' => [
|
|
|
+ 'header' => $header,
|
|
|
+ ],
|
|
|
+ 'no_extra_consecutive_blank_lines' => true,
|
|
|
+ 'no_php4_constructor' => true,
|
|
|
+ 'no_useless_else' => true,
|
|
|
+ 'no_useless_return' => true,
|
|
|
+ 'ordered_class_elements' => true,
|
|
|
+ 'ordered_imports' => true,
|
|
|
+ 'phpdoc_order' => true,
|
|
|
+ '@PHP56Migration' => true,
|
|
|
+ '@PHP56Migration:risky' => true,
|
|
|
+ '@PHPUnit57Migration:risky' => true,
|
|
|
+ // To be tested before insertion:
|
|
|
+// 'strict_comparison' => true,
|
|
|
+// 'strict_param' => true,
|
|
|
+// 'php_unit_strict' => true,
|
|
|
+];
|
|
|
+
|
|
|
+$finder = PhpCsFixer\Finder::create()
|
|
|
+ ->exclude('app')
|
|
|
+ ->exclude('documentation')
|
|
|
+ ->exclude('vendor')
|
|
|
+ ->exclude('tests')
|
|
|
+ ->exclude('web')
|
|
|
+ ->in(__DIR__)
|
|
|
+;
|
|
|
+
|
|
|
+return PhpCsFixer\Config::create()
|
|
|
+ ->setRules([
|
|
|
+ '@PSR2' => true,
|
|
|
+ //'strict_param' => true,
|
|
|
+ 'array_syntax' => ['syntax' => 'short'],
|
|
|
+ ])
|
|
|
+ ->setFinder($finder)
|
|
|
+;
|