forked from CuyZ/Valinor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
34 lines (31 loc) · 1.16 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
<?php
$finder = PhpCsFixer\Finder::create()->in([
'./src',
'./tests',
'./qa',
])
->notPath('Fixtures/FunctionWithGroupedImportStatements.php')
->notPath('Fixtures/FunctionWithSeveralImportStatementsInSameUseStatement.php')
->notPath('Fixtures/TwoClassesInDifferentNamespaces.php');
if (PHP_VERSION_ID < 8_01_00) {
$finder = $finder->notPath('Fixture/Enum/PureEnum.php');
$finder = $finder->notPath('Fixture/Enum/BackedStringEnum.php');
$finder = $finder->notPath('Fixture/Enum/BackedIntegerEnum.php');
$finder = $finder->notPath('Fixture/Object/ObjectWithPropertyWithNativeIntersectionType.php');
$finder = $finder->notPath('Integration/Mapping/Fixture/ReadonlyValues.php');
}
return (new PhpCsFixer\Config())
->setFinder($finder)
->setCacheFile('var/cache/.php_cs.cache')
->setRules([
'@PSR1' => true,
'@PSR12' => true,
'no_unused_imports' => true,
'no_extra_blank_lines' => true,
'no_empty_phpdoc' => true,
'single_line_empty_body' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'remove_inheritdoc' => true,
],
]);