-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
62 lines (60 loc) · 1.98 KB
/
.php-cs-fixer.dist.php
File metadata and controls
62 lines (60 loc) · 1.98 KB
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
<?php
$finder = new PhpCsFixer\Finder();
$finder
->notName('*.twig')
->notName('*.yml')
->in(['src/', 'tests/'])
;
$config = new PhpCsFixer\Config();
$config
->setParallelConfig(new PhpCsFixer\Runner\Parallel\ParallelConfig(4, 20))
->setRiskyAllowed(true)
->setRules([
'@PHP8x3Migration' => true,
'@PHP8x4Migration' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
// one should use PHPUnit methods to set up expected exception instead of annotations
'general_phpdoc_annotation_remove' => [
'annotations' => [
'expectedException',
'expectedExceptionMessage',
'expectedExceptionMessageRegExp',
]
],
'global_namespace_import' => [
'import_classes' => true,
],
'heredoc_to_nowdoc' => true,
'no_extra_blank_lines' => [
'tokens' => [
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block',
],
],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
// 'php_unit_strict' => true,
// Disabled as some tests fail after moving AssertEquals to AssertSame
// \todo enable again after determining why that assert fails.
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'semicolon_after_instruction' => true,
'strict_comparison' => true,
'strict_param' => true,
'concat_space' => ['spacing' => 'one'],
])
->setFinder($finder);
return $config;