-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
40 lines (36 loc) · 1.43 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
<?php
// Reference: http://cs.sensiolabs.org/
// Usage: php-cs-fixer fix app
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude(['bootstrap', 'storage', 'vendor', 'spec', 'nova', 'ssh', 'public', 'database/migrations'])
->name('*.php')
->name('_ide_helper')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@PHP81Migration' => true,
'multiline_whitespace_before_semicolons' => false,
'array_syntax' => ['syntax' => 'short'],
'simplified_null_return' => false,
'strict_comparison' => true,
'strict_param' => false,
'yoda_style' => false,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'no_extra_blank_lines' => ['tokens' => ['break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'switch', 'throw', 'use', 'use_trait']],
'phpdoc_add_missing_param_annotation' => false,
'phpdoc_separation' => false,
'phpdoc_align' => ['align' => 'left'],
'array_indentation' => true,
'method_chaining_indentation' => true,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
],
])
->setFinder($finder);