-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.php-cs-fixer.dist.php
41 lines (36 loc) · 1.12 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
<?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__ . '/tests')
->append([
__FILE__,
])
->exclude([
'Fixtures',
]),
)
->setParallelConfig(ParallelConfigFactory::detect())
->setCacheFile(__DIR__ . '/var/' . basename(__FILE__) . '.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,
'class_attributes_separation' => ['elements' => [
'trait_import' => 'only_if_meta',
'const' => 'only_if_meta',
'case' => 'only_if_meta',
'property' => 'one',
'method' => 'one',
]],
]);
return $config;