-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.dist.php
47 lines (42 loc) · 1.4 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
41
42
43
44
45
46
47
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
use PHPyh\CodingStandard\PhpCsFixerCodingStandard;
$config = (new Config())
->setFinder(
Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tools/psalm/src')
->append([
__FILE__,
__DIR__ . '/.visitors.php-cs-fixer.dist.php',
])
->append(
Finder::create()
->in(__DIR__ . '/tests')
->exclude([
'Fixtures',
]),
),
)
->setParallelConfig(ParallelConfigFactory::detect())
->setCacheFile(__DIR__ . '/var/' . basename(__FILE__, '.dist.php') . '.cache');
(new PhpCsFixerCodingStandard())->applyTo($config, [
'final_public_method_for_abstract_class' => false,
'no_unset_on_property' => false,
/** @see TypeInheritance */
'strict_comparison' => false,
'logical_operators' => false,
'no_multiline_whitespace_around_double_arrow' => false,
'ordered_class_elements' => ['order' => ['use_trait']],
'class_attributes_separation' => ['elements' => [
'trait_import' => 'only_if_meta',
'const' => 'only_if_meta',
'case' => 'only_if_meta',
'property' => 'one',
'method' => 'one',
]],
]);
return $config;