-
Notifications
You must be signed in to change notification settings - Fork 5
/
.php-cs-fixer.dist.php
52 lines (48 loc) · 1.39 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
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
$rules = [
'@Symfony' => true,
'new_with_parentheses' => true,
'concat_space' => [
'spacing' => 'one',
],
'array_syntax' => [
'syntax' => 'short',
],
'yoda_style' => false,
'phpdoc_no_empty_return' => false,
'no_superfluous_phpdoc_tags' => true,
'single_line_throw' => false,
'array_indentation' => true,
'declare_strict_types' => true,
'void_return' => true,
'non_printable_character' => true,
'modernize_types_casting' => true,
'ordered_interfaces' => [
'order' => 'alpha',
'direction' => 'ascend',
],
'date_time_immutable' => true,
'native_constant_invocation' => true,
'combine_nested_dirname' => true,
'native_function_invocation' => [
'include' => [
'@compiler_optimized'
],
'scope' => 'namespaced',
'strict' => true,
],
'php_unit_construct' => true,
'php_unit_dedicate_assert' => true,
'php_unit_expectation' => true,
'php_unit_internal_class' => true,
'php_unit_mock_short_will_return' => true,
'php_unit_strict' => true,
'strict_comparison' => true,
];
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRules($rules)
->setFinder($finder);