-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php
68 lines (62 loc) · 2.09 KB
/
.php-cs-fixer.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
67
68
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => [
'syntax' => 'short'
],
'binary_operator_spaces' => [
'operators' => [
'=>' => 'align'
]
],
'concat_space' => [
'spacing' => 'one'
],
'declare_strict_types' => true,
'get_class_to_class_keyword' => false,
'global_namespace_import' => false,
'linebreak_after_opening_tag' => true,
'mb_str_functions' => true,
'native_function_invocation' => [
'include' => [
'@all'
]
],
'no_php4_constructor' => true,
'no_superfluous_phpdoc_tags' => false,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'nullable_type_declaration_for_default_null_value' => true,
'ordered_imports' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
'semicolon_after_instruction' => true,
'single_import_per_statement' => false,
'strict_comparison' => true,
'strict_param' => true,
'single_line_throw' => false,
'trailing_comma_in_multiline' => false,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false
],
];
$finder = Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests'
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$config = new Config();
return $config->setFinder($finder)
->setRules($rules)
->setRiskyAllowed(true)
->setUsingCache(true);