9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
- use Symfony \CS \Config \Config ;
13
- use Symfony \CS \Finder \DefaultFinder ;
14
- use Symfony \CS \Fixer \Contrib \HeaderCommentFixer ;
15
- use Symfony \CS \FixerInterface ;
16
-
17
- $ finder = DefaultFinder::create ()
18
- ->in (__DIR__ )
19
- ;
20
-
21
12
$ header = <<<EOF
22
13
This file is part of the FOSOAuthServerBundle package.
23
14
@@ -27,11 +18,53 @@ For the full copyright and license information, please view the LICENSE
27
18
file that was distributed with this source code.
28
19
EOF ;
29
20
30
- HeaderCommentFixer::setHeader ($ header );
21
+ $ finder = PhpCsFixer \Finder::create ()
22
+ ->exclude ('vendor ' )
23
+ ->in (__DIR__ );
31
24
32
- return Config::create ()
33
- ->level (FixerInterface::SYMFONY_LEVEL )
34
- ->fixers (array ('align_double_arrow ' , 'header_comment ' ))
35
- ->finder ($ finder )
36
- ->setUsingCache (true )
37
- ;
25
+ return PhpCsFixer \Config::create ()
26
+ ->setRiskyAllowed (true )
27
+ ->setUsingCache (false )
28
+ ->setRules (
29
+ [
30
+ '@Symfony ' => true ,
31
+ '@PHPUnit60Migration:risky ' => true ,
32
+ 'array_syntax ' => ['syntax ' => 'short ' ],
33
+ 'combine_consecutive_unsets ' => true ,
34
+ 'declare_strict_types ' => true ,
35
+ 'dir_constant ' => true ,
36
+ 'general_phpdoc_annotation_remove ' => ['@author ' ],
37
+ 'header_comment ' => ['header ' => $ header ],
38
+ 'linebreak_after_opening_tag ' => true ,
39
+ 'mb_str_functions ' => true ,
40
+ 'modernize_types_casting ' => true ,
41
+ // 'native_function_invocation' => true,
42
+ 'no_extra_consecutive_blank_lines ' => ['continue ' , 'extra ' , 'return ' , 'throw ' , 'use ' , 'parenthesis_brace_block ' , 'square_brace_block ' , 'curly_brace_block ' ],
43
+ 'no_multiline_whitespace_before_semicolons ' => true ,
44
+ 'no_php4_constructor ' => true ,
45
+ 'no_short_echo_tag ' => true ,
46
+ 'no_unreachable_default_argument_value ' => true ,
47
+ 'no_useless_else ' => true ,
48
+ 'no_useless_return ' => true ,
49
+ 'not_operator_with_space ' => false ,
50
+ 'not_operator_with_successor_space ' => false ,
51
+ 'ordered_class_elements ' => true ,
52
+ 'ordered_imports ' => true ,
53
+ 'php_unit_construct ' => true ,
54
+ 'php_unit_strict ' => true ,
55
+ 'phpdoc_add_missing_param_annotation ' => true ,
56
+ 'phpdoc_annotation_without_dot ' => true ,
57
+ 'phpdoc_inline_tag ' => false ,
58
+ 'phpdoc_no_empty_return ' => false ,
59
+ 'phpdoc_order ' => true ,
60
+ 'phpdoc_to_comment ' => false ,
61
+ 'psr4 ' => true ,
62
+ 'random_api_migration ' => true ,
63
+ 'semicolon_after_instruction ' => true ,
64
+ 'single_import_per_statement ' => true ,
65
+ 'strict_comparison ' => true ,
66
+ 'strict_param ' => true ,
67
+ 'yoda_style ' => false
68
+ ]
69
+ )
70
+ ->setFinder ($ finder );
0 commit comments