-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
43 lines (42 loc) · 1.66 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
<?php
$config = new PhpCsFixer\Config();
$config
->setFinder(
PhpCsFixer\Finder::create()
->exclude(['vendor'])
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
)
->setRiskyAllowed(false)
->setRules([
'declare_equal_normalize' => true,
'heredoc_to_nowdoc' => true,
'multiline_whitespace_before_semicolons' => true,
'spaces_inside_parentheses' => false,
'no_unused_imports' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'not_operator_with_successor_space' => false,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'return_type_declaration' => true,
'unary_operator_spaces' => true,
'trailing_comma_in_multiline' => true,
'@PSR2' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => null,
'operators' => [
'=>' => 'align_single_space_minimal',
],
],
'concat_space' => [
'spacing' => 'one',
],
]);
return $config;