-
Notifications
You must be signed in to change notification settings - Fork 125
/
.php-cs-fixer.php
41 lines (39 loc) · 1.33 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
<?php
$finder = PhpCsFixer\Finder::create()
->notPath('vendor')
->notPath('bootstrap')
->notPath('storage')
->notPath('node_modules')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreVCS(true);
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'length'],
'single_quote' => true,
'phpdoc_summary' => true,
'phpdoc_add_missing_param_annotation' => true,
'no_unused_imports' => true,
'no_extra_blank_lines' => true,
'no_trailing_comma_in_list_call' => false,
'no_whitespace_in_blank_line' => true,
'no_whitespace_before_comma_in_array' => true,
'trailing_comma_in_multiline' => true,
'function_typehint_space' => true,
'phpdoc_order' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'alpha',
],
'phpdoc_to_comment' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_summary' => true,
'phpdoc_trim' => true,
'phpdoc_single_line_var_spacing' => true,
'not_operator_with_successor_space' => true,
])
->setFinder($finder);