Skip to content

Commit 5ae3213

Browse files
committed
Passage du linter à PER-CS2.0
Le standard PER est plus souple et évolutif que les PSR, car il change avec les modifications de PHP. https://www.php-fig.org/per/coding-style/
1 parent 8365ade commit 5ae3213

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

.php-cs-fixer.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,20 @@
1717
->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers())
1818
->setRiskyAllowed(true)
1919
->setRules([
20-
'@PSR2' => true,
20+
'@PER-CS2.0' => true,
2121
'@PHP74Migration:risky' => true,
22-
'blank_line_after_opening_tag' => true,
23-
'concat_space' => ['spacing' => 'one'],
2422
'no_alias_functions' => true,
2523
'native_function_casing' => true,
26-
'no_blank_lines_after_class_opening' => true,
27-
'ordered_imports' => true,
2824
'phpdoc_no_access' => true,
29-
'no_leading_import_slash' => true,
3025
'self_accessor' => true,
31-
'array_syntax' => ['syntax' => 'short'],
32-
'cast_spaces' => true,
3326
'no_unused_imports' => true,
34-
'no_whitespace_in_blank_line' => true,
3527
'method_argument_space' => false,
3628
'statement_indentation' => false,
3729
MultilinePromotedPropertiesFixer::name() => [
3830
'keep_blank_lines' => true,
3931
'minimum_number_of_parameters' => 2,
4032
],
41-
'trailing_comma_in_multiline' => [
42-
'elements' => ['arrays', 'parameters']
43-
],
33+
'type_declaration_spaces' => true,
4434
])
4535
->setFinder($finder)
4636
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')

0 commit comments

Comments
 (0)