-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.php-cs-fixer.php
executable file
·44 lines (39 loc) · 1.17 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
42
43
44
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
;
$config = new PhpCsFixer\Config();
$config
->setRules([
'@Symfony' => true,
'array_indentation' => true,
'function_typehint_space' => true,
'declare_equal_normalize' => true,
'declare_strict_types' => true,
'combine_consecutive_unsets' => true,
// 'binary_operator_spaces' => ['align_double_arrow' => false],
'array_syntax' => ['syntax' => 'short'],
'linebreak_after_opening_tag' => true,
'not_operator_with_successor_space' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'php_unit_construct' => false,
'braces' => [
'position_after_functions_and_oop_constructs' => 'same',
],
'function_declaration' => true,
'blank_line_after_namespace' => true,
'class_definition' => true,
'elseif' => true,
])
->setFinder($finder)
;
return $config;