-
Notifications
You must be signed in to change notification settings - Fork 6
/
.php-cs-fixer.dist.php
40 lines (36 loc) · 1.38 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
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
if (!file_exists(__DIR__.'/src')) {
exit(0);
}
// https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.14.3/.php-cs-fixer.dist.php
return (new Config())
->setRules([
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'@PHPUnit100Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP81Migration' => true,
'@PHP80Migration:risky' => true,
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead
'heredoc_indentation' => false, // TODO switch on when # of PR's is lower
'modernize_strpos' => true, // needs PHP 8+ or polyfill
'no_useless_concat_operator' => false, // TODO switch back on when the `src/Console/Application.php` no longer needs the concat
'use_arrow_functions' => false, // TODO switch on when # of PR's is lower
'php_unit_strict' => false,
'php_unit_test_class_requires_covers' => false,
'strict_comparison' => false,
'strict_param' => false,
'php_unit_internal_class' => false,
])
->setRiskyAllowed(true)
->setFinder(
Finder::create()
->in(__DIR__.'/src')
->append([__FILE__])
->in(__DIR__.'/tests')
)
;