-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.php-cs-fixer.dist.php
51 lines (48 loc) · 1.64 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
<?php
// Config by: @metallurgical
// From: https://github.com/seajell/seajell/blob/main/.php-cs-fixer.dist.php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('vendor')
->notPath('bootstrap')
->notPath('storage')
->notPath('public')
->notPath('config')
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
->in(__DIR__);
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@Symfony' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'ordered_imports' => ['sort_algorithm' => 'length'],
'no_unused_imports' => true,
'elseif' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => true,
'linebreak_after_opening_tag' => true,
'not_operator_with_successor_space' => false,
'phpdoc_order' => true,
'phpdoc_align' => ['align' => 'left'],
'concat_space'=> ['spacing' => 'one'],
'new_with_braces' => false,
'phpdoc_no_empty_return' => false,
'trailing_comma_in_multiline' => true,
'whitespace_after_comma_in_array' => true,
'method_chaining_indentation' => true,
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => [
'statements' => ['return']
],
'visibility_required' => [
'elements' => ['method', 'property']
],
'single_line_comment_style' => true,
])
->setFinder($finder);