-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php_cs.dist
64 lines (61 loc) · 2.29 KB
/
.php_cs.dist
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setUsingCache(false)
->setRules(
[
'@DoctrineAnnotation' => true,
'@PHP73Migration' => true,
'@PHP71Migration:risky' => true,
'@PHP70Migration:risky' => true,
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PSR2' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'declare_strict_types' => true,
'random_api_migration' => true,
'dir_constant' => true,
'modernize_types_casting' => true,
'php_unit_construct' => true,
'psr4' => true,
'final_internal_class' => true,
'php_unit_strict' => [
'assertions' => [
'assertAttributeEquals',
'assertAttributeNotEquals',
// 'assertEquals', // This will replace all assertEquals with assertSame that can affect array comparisons
'assertNotEquals',
],
],
'php_unit_test_case_static_method_calls' => true,
'strict_comparison' => true,
'strict_param' => true,
'date_time_immutable' => true,
'general_phpdoc_annotation_remove' => true,
'mb_str_functions' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_php4_constructor' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
],
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'ordered_interfaces' => true,
'php_unit_size_class' => true,
'phpdoc_to_return_type' => true,
'static_lambda' => true,
'phpdoc_to_comment' => false, // This allows us some flexibility with PhpStan type resolution
'concat_space' => [
'spacing' => 'one',
],
]
)
->setFinder($finder);