-
Notifications
You must be signed in to change notification settings - Fork 12
/
.php-cs-fixer.dist.php
44 lines (41 loc) · 1.4 KB
/
.php-cs-fixer.dist.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([__DIR__])
->exclude([
'tests/Fixtures/Symfony/app/var',
'tests/Unit/Server/Php8',
'vendor',
'hack',
'ext',
]);
$config = new PhpCsFixer\Config();
/**
* @see https://github.com/FriendsOfPHP/PHP-CS-Fixer for rules
*/
return $config->setRules([
'@Symfony' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@PHP74Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'compact_nullable_typehint' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'no_null_property_initialization' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'phpdoc_order' => true,
'phpdoc_types_order' => true,
'ordered_class_elements' => true,
'array_indentation' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'no_blank_lines_after_class_opening' => true,
'blank_line_before_statement' => true,
'class_reference_name_casing' => false,
])
->setRiskyAllowed(false)
->setFinder($finder);