-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy path.php-cs-fixer.dist.php
45 lines (42 loc) · 1.29 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
45
<?php
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$config = new PhpCsFixer\Config();
$config
->setRules([
'@PHP80Migration:risky' => true,
'@Symfony:risky' => true,
'@Symfony' => true,
'binary_operator_spaces' => ['operators' => ['|' => null]], // https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5495
'global_namespace_import' => false,
'nullable_type_declaration_for_default_null_value' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private',
],
'sort_algorithm' => 'alpha',
],
'phpdoc_align' => ['align' => 'left'],
'use_arrow_functions' => false,
])
->setFinder($finder);
return $config;