-
-
Notifications
You must be signed in to change notification settings - Fork 574
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
43 lines (38 loc) · 1.01 KB
/
.php-cs-fixer.php
File metadata and controls
43 lines (38 loc) · 1.01 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
<?php declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$phpVersion = phpversion();
if (version_compare($phpVersion, '8.0', '<')) {
$finder->notPath([
'src/Type/Definition/Deprecated.php',
'src/Type/Definition/Description.php',
]);
}
if (version_compare($phpVersion, '8.1', '<')) {
$finder->notPath([
'src/Type/Definition/PhpEnumType.php',
'tests/Type/PhpEnumType',
]);
}
return MLL\PhpCsFixerConfig\risky($finder, [
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
],
'phpdoc_align' => [
'align' => 'left',
],
'phpdoc_order_by_value' => [
'annotations' => [
'throws',
],
],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
])->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());