|
2 | 2 |
|
3 | 3 | // Invoke the config easily with `php-cs-fixer fix` |
4 | 4 |
|
5 | | -$finder = Symfony\CS\Finder\DefaultFinder::create() |
| 5 | +$finder = \PhpCsFixer\Finder::create() |
6 | 6 | ->files() |
7 | 7 | ->name('*.php') |
8 | 8 | ->in(__DIR__ . '/src') |
9 | 9 | ->in(__DIR__ . '/tests'); |
10 | 10 |
|
11 | | -return Symfony\CS\Config\Config::create() |
| 11 | +return PhpCsFixer\Config::create() |
12 | 12 | ->setUsingCache(false) |
13 | | - ->level(Symfony\CS\FixerInterface::NONE_LEVEL) |
14 | | - ->fixers(array( |
15 | | - 'psr0', 'encoding', 'short_tag', 'braces', 'elseif', 'eof_ending', 'function_call_space', 'function_declaration', |
16 | | - 'indentation', 'line_after_namespace', 'linefeed', 'lowercase_constants', 'lowercase_keywords', 'method_argument_space', |
17 | | - 'multiple_use', 'parenthesis', 'php_closing_tag', 'trailing_spaces', 'visibility', 'array_element_no_space_before_comma', |
18 | | - 'array_element_white_space_after_comma', 'blankline_after_open_tag', 'duplicate_semicolon', 'extra_empty_lines', |
19 | | - 'function_typehint_space', 'include', 'list_commas ', 'namespace_no_leading_whitespace', 'no_blank_lines_after_class_opening ', |
20 | | - 'no_empty_lines_after_phpdocs ', 'object_operator', 'operators_spaces', 'phpdoc_indent', 'phpdoc_params', |
21 | | - 'return', 'self_accessor', 'single_array_no_trailing_comma', 'single_quote', 'spaces_cast', 'standardize_not_equal', |
22 | | - 'ternary_spaces', 'unneeded_control_parentheses', 'unused_use', 'whitespacy_lines', 'short_array_syntax', |
23 | | - 'align_double_arrow', 'align_equals' |
| 13 | + ->setRules(array( |
| 14 | + 'psr4' => true, |
| 15 | + 'encoding' => true, |
| 16 | + 'full_opening_tag' => true, |
| 17 | + 'braces' => true, |
| 18 | + 'elseif' => true, |
| 19 | + 'single_blank_line_at_eof' => true, |
| 20 | + 'no_spaces_after_function_name' => true, |
| 21 | + 'function_declaration' => true, |
| 22 | + 'blank_line_after_namespace' => true, |
| 23 | + 'blank_line_before_statement' => true, |
| 24 | + 'lowercase_constants' => true, |
| 25 | + 'lowercase_keywords' => true, |
| 26 | + 'method_argument_space' => true, |
| 27 | + 'no_closing_tag' => true, |
| 28 | + 'no_trailing_whitespace' => true, |
| 29 | + 'visibility_required' => true, |
| 30 | + 'blank_line_after_opening_tag' => true, |
| 31 | + 'no_empty_statement' => true, |
| 32 | + 'no_extra_blank_lines' => true, |
| 33 | + 'function_typehint_space' => true, |
| 34 | + 'include' => true, |
| 35 | + 'no_blank_lines_after_phpdoc' => true, |
| 36 | + 'object_operator_without_whitespace' => true, |
| 37 | + 'phpdoc_indent' => true, |
| 38 | + 'phpdoc_align' => true, |
| 39 | + 'self_accessor' => true, |
| 40 | + 'no_trailing_comma_in_list_call' => true, |
| 41 | + 'single_quote' => true, |
| 42 | + 'cast_spaces' => true, |
| 43 | + 'standardize_not_equals' => true, |
| 44 | + 'ternary_operator_spaces' => true, |
| 45 | + 'no_unneeded_control_parentheses' => true, |
| 46 | + 'no_unused_imports' => true, |
| 47 | + 'array_syntax' => ['syntax' => 'short'], |
| 48 | + 'binary_operator_spaces' => [ |
| 49 | + 'align_double_arrow' => true, |
| 50 | + 'align_equals' => true, |
| 51 | + ] |
24 | 52 | )) |
25 | | - ->finder($finder); |
| 53 | + ->setFinder($finder); |
0 commit comments