-
-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
53 lines (50 loc) · 1.63 KB
/
.php-cs-fixer.dist.php
File metadata and controls
53 lines (50 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
<?php
$finder = PhpCsFixer\Finder::create()->in([
'./src',
'./tests',
'./qa',
])
->notPath('Integration/Normalizer/ExpectedCache/')
->notPath('Fixtures/FunctionWithGroupedImportStatements.php')
->notPath('Fixtures/FunctionWithSeveralImportStatementsInSameUseStatement.php')
->notPath('Fixtures/TwoClassesInDifferentNamespaces.php');
if (PHP_VERSION_ID < 8_05_00) {
$finder = $finder->notPath('Integration/Normalizer/TemporaryPHP85/ClassWithPropertyTransformerWithCallable.php');
}
return (new PhpCsFixer\Config())
->setFinder($finder)
->setCacheFile('var/cache/.php_cs.cache')
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setUnsupportedPhpVersionAllowed(true)
->setRules([
'@PSR1' => true,
'@PSR12' => true,
'no_unused_imports' => true,
'no_extra_blank_lines' => true,
'no_empty_phpdoc' => true,
'single_line_empty_body' => true,
'no_empty_statement' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'remove_inheritdoc' => true,
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'native_function_invocation' => [
'include' => [
'@internal',
],
],
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],
]);