-
-
Notifications
You must be signed in to change notification settings - Fork 452
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
58 lines (55 loc) · 1.63 KB
/
.php-cs-fixer.dist.php
File metadata and controls
58 lines (55 loc) · 1.63 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
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
;
return (new PhpCsFixer\Config())
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setRules([
'@PER-CS3x0:risky' => true,
'@PHPUnit9x1Migration:risky' => true,
'class_attributes_separation' => true,
'class_definition' => [
'single_line' => true,
],
'concat_space' => [
'spacing' => 'none',
],
'final_internal_class' => true,
'fully_qualified_strict_types' => [
'import_symbols' => true,
'leading_backslash_in_global_namespace' => true,
],
'method_argument_space' => [
'attribute_placement' => 'standalone', // same_line can break PHP <8.2
],
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
'no_unneeded_braces' => true,
'no_unused_imports' => true,
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],
'phpdoc_align' => [
'align' => 'left',
],
'php_unit_method_casing' => [
'case' => 'camel_case',
],
'php_unit_test_case_static_method_calls' => [
'call_type' => 'this',
'methods' => [],
],
'single_line_empty_body' => false,
'yoda_style' => false,
])
->setFinder($finder);