1
+ <?php
2
+
3
+ return PhpCsFixer \Config::create ()
4
+ ->setUsingCache (false )
5
+ ->setRiskyAllowed (true )
6
+ //->setCacheFile(__DIR__ . '/.php_cs.cache')
7
+ ->setRules (array (
8
+ '@PSR1 ' => true ,
9
+ '@PSR2 ' => true ,
10
+ '@Symfony ' => true ,
11
+ 'psr4 ' => true ,
12
+ // Custom rules
13
+ 'align_multiline_comment ' => array ('comment_type ' => 'phpdocs_only ' ), // PSR-5
14
+ 'phpdoc_to_comment ' => false ,
15
+ 'array_indentation ' => true ,
16
+ //'array_syntax' => ['syntax' => 'short'],
17
+ 'cast_spaces ' => array ('space ' => 'none ' ),
18
+ 'concat_space ' => array ('spacing ' => 'one ' ),
19
+ 'compact_nullable_typehint ' => true ,
20
+ 'declare_equal_normalize ' => array ('space ' => 'single ' ),
21
+ 'increment_style ' => array ('style ' => 'post ' ),
22
+ 'list_syntax ' => array ('syntax ' => 'long ' ),
23
+ 'no_short_echo_tag ' => true ,
24
+ 'phpdoc_align ' => false ,
25
+ 'phpdoc_no_empty_return ' => false ,
26
+ 'phpdoc_order ' => true , // PSR-5
27
+ 'phpdoc_no_useless_inheritdoc ' => false ,
28
+ 'protected_to_private ' => false ,
29
+ 'yoda_style ' => false ,
30
+ 'method_argument_space ' => array ('on_multiline ' => 'ensure_fully_multiline ' ),
31
+ 'ordered_imports ' => array (
32
+ 'sort_algorithm ' => 'alpha ' ,
33
+ 'imports_order ' => array ('class ' , 'const ' , 'function ' )
34
+ ),
35
+ ))
36
+ ->setFinder (PhpCsFixer \Finder::create ()
37
+ ->in (__DIR__ )
38
+ ->name ('*.php ' )
39
+ ->ignoreDotFiles (true )
40
+ ->ignoreVCS (true ));
0 commit comments