-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphp-cs-fixer.php
More file actions
55 lines (51 loc) · 1.94 KB
/
php-cs-fixer.php
File metadata and controls
55 lines (51 loc) · 1.94 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
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = (new Finder())
->in([
__DIR__.'/src',
__DIR__.'/tests',
])
->append([__FILE__]);
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setCacheFile(__DIR__.'/cache/php-cs-fixer.cache')
->setRiskyAllowed(true)
->setRules([
'@PER-CS' => true,
'@PER-CS:risky' => true,
'@PHP80Migration:risky' => true,
'@PHP83Migration' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHPUnit100Migration:risky' => true,
'string_implicit_backslashes' => false,
'final_class' => true,
'final_public_method_for_abstract_class' => true,
'date_time_immutable' => true,
'nullable_type_declaration_for_default_null_value' => true,
'self_static_accessor' => true,
'static_lambda' => true,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'binary_operator_spaces' => true,
'ordered_imports' => true,
'return_assignment' => false,
'phpdoc_to_comment' => [
'ignored_tags' => [
'psalm-suppress',
'phpstan-ignore-next-line',
'var',
],
],
'global_namespace_import' => ['import_classes' => true],
'phpdoc_align' => ['align' => 'left'],
'phpdoc_line_span' => true,
'phpdoc_summary' => false,
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
'php_unit_test_class_requires_covers' => false,
'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arguments', 'array_destructuring', 'arrays', 'match', 'parameters']],
])
->setFinder($finder);