Skip to content

Commit 328fd09

Browse files
committed
Updated php-cs-fixer config
1 parent 8072210 commit 328fd09

1 file changed

Lines changed: 39 additions & 41 deletions

File tree

.php_cs

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,49 @@
11
<?php
22

3-
$finder = Symfony\CS\Finder\DefaultFinder::create();
3+
$finder = PhpCsFixer\Finder::create();
44
$finder->in([
55
__DIR__ . '/src',
66
__DIR__ . '/tests/integration',
77
__DIR__ . '/tests/unit'
88
]);
99

10-
$config = Symfony\CS\Config\Config::create();
11-
$config->setUsingCache(true);
12-
$config->setUsingLinter(false);
13-
$config->finder($finder);
14-
$config->level(Symfony\CS\FixerInterface::PSR2_LEVEL);
15-
$config->fixers([
16-
//symfony
17-
'double_arrow_multiline_whitespaces',
18-
'duplicate_semicolon',
19-
'empty_return',
20-
'extra_empty_lines',
21-
'include',
22-
'join_function',
23-
'multiline_array_trailing_comma',
24-
'namespace_no_leading_whitespace',
25-
'new_with_braces',
26-
'no_blank_lines_after_class_opening',
27-
'object_operator',
28-
'operators_spaces',
29-
'phpdoc_indent',
30-
'phpdoc_params',
31-
'remove_leading_slash_use',
32-
'remove_lines_between_uses',
33-
'return',
34-
'single_array_no_trailing_comma',
35-
'spaces_before_semicolon',
36-
'spaces_cast',
37-
'standardize_not_equal',
38-
'ternary_spaces',
39-
'unused_use',
40-
'whitespacy_lines',
41-
42-
//contrib
43-
'align_double_arrow',
44-
'align_equals',
45-
'concat_with_spaces',
46-
'multiline_spaces_before_semicolon',
47-
'ordered_use',
48-
'short_array_syntax',
49-
]);
10+
$config = PhpCsFixer\Config::create()
11+
->setUsingCache(true)
12+
->setRiskyAllowed(true)
13+
->setFinder($finder)
14+
->setRules([
15+
'@PSR1' => true,
16+
'@PSR2' => true,
17+
'@Symfony' => true,
18+
'@Symfony:risky' => true,
19+
'@PhpCsFixer' => true,
20+
'align_multiline_comment' => true,
21+
'array_syntax' => ['syntax' => 'short'],
22+
'declare_strict_types' => false,
23+
'return_assignment' => false,
24+
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
25+
'dir_constant' => true,
26+
'elseif' => false,
27+
'ereg_to_preg' => true,
28+
'is_null' => true,
29+
'list_syntax' => ['syntax' => 'short'],
30+
'mb_str_functions' => true,
31+
'phpdoc_order' => true,
32+
'concat_space' => ['spacing' => 'one'],
33+
'yoda_style' => [
34+
'equal' => false,
35+
'identical' => false,
36+
'less_and_greater' => false,
37+
],
38+
'fully_qualified_strict_types' => true,
39+
'global_namespace_import' => [
40+
'import_classes' => true,
41+
],
42+
'phpdoc_to_comment' => false,
43+
'method_argument_space' => ['on_multiline' => 'ignore'],
44+
'php_unit_ordered_covers' => false,
45+
'no_superfluous_elseif' => false,
46+
]
47+
);
5048

5149
return $config;

0 commit comments

Comments
 (0)