-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php-cs-fixer.dist.php
66 lines (63 loc) · 2.36 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'linebreak_after_opening_tag' => false,
'blank_line_after_opening_tag' => false,
'phpdoc_summary' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_to_comment' => false,
'declare_strict_types' => true,
'strict_comparison' => true,
'strict_param' => true,
'no_useless_else' => true,
'void_return' => true,
'phpdoc_line_span' => true,
'php_unit_dedicate_assert_internal_type' => true,
'php_unit_mock' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'static'],
'no_useless_return' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
'single_line_throw' => false,
'fopen_flags' => false,
'self_accessor' => false,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_order' => ['order' => ['param', 'throws', 'return']],
'class_attributes_separation' => ['elements' => ['property' => 'one', 'method' => 'one']],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'concat_space' => ['spacing' => 'one'],
'native_function_invocation' => [
'scope' => 'namespaced',
'strict' => false,
'exclude' => ['ini_get'],
],
'general_phpdoc_annotation_remove' => ['annotations' => ['copyright', 'category']],
'no_superfluous_phpdoc_tags' => ['allow_unused_params' => true, 'allow_mixed' => true],
'php_unit_dedicate_assert' => ['target' => 'newest'],
'single_quote' => ['strings_containing_single_quote_chars' => true],
])
->setUsingCache(true)
->setCacheFile('var/cache/cs_fixer.cache')
->setFinder(
(new Finder())->in([
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/public',
__DIR__ . '/config',
__DIR__ . '/bin',
])->exclude([
'node_modules',
'*/vendor/*',
])
);