-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php-cs-fixer.dist.php
34 lines (31 loc) · 1.05 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
<?php
use PhpCsFixer\Finder;
$finder = Finder::create()
->notPath([
'vendor',
'public',
'storage',
'bootstrap/cache',
])
->ignoreVCS(true)
->in(__DIR__);
return (new PhpCsFixer\Config)
->setRules([
'@PSR12' => true,
'static_lambda' => true,
'no_unused_imports' => true,
'simplified_if_return' => true,
'normalize_index_brace' => true,
'simplified_null_return' => true,
'single_trait_insert_per_statement' => false,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'length'],
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'new_with_parentheses' => ['anonymous_class' => false, 'named_class' => false],
'braces_position' => [
'classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
],
])
->setFinder($finder)
->setRiskyAllowed(true);