-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.php-cs-fixer.php
29 lines (28 loc) · 1.79 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
<?php
return (new PhpCsFixer\Config())->setRules(
[
'@PSR12' => true,
'declare_strict_types' => true,
'strict_comparison' => true,
'strict_param' => true,
'blank_line_after_opening_tag' => false,
'no_extra_blank_lines' => true,
'class_attributes_separation' => ['elements' => ['const' => 'only_if_meta', 'method' => 'one', 'property' => 'only_if_meta', 'trait_import' => 'only_if_meta', 'case' => 'only_if_meta']],
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['default' => 'single_space'],
'no_unused_imports' => true,
'array_indentation' => true,
'no_alias_functions' => true,
'phpdoc_line_span' => ['property' => 'single', 'method' => 'single', 'const' => 'single'],
'phpdoc_order' => ['order' => ['deprecated', 'internal', 'standard', 'source', 'template', 'implements', 'extends', 'covers', 'coversDefaultClass', 'param', 'throws', 'return']],
'phpdoc_param_order' => true,
'phpdoc_separation' => ['groups' => [['deprecated', 'internal'], ['standard', 'source'], ['covers', 'coversDefaultClass'], ['template', 'implements', 'extends', 'param', 'throws', 'return']]],
'phpdoc_trim' => true,
'concat_space' => ['spacing' => 'one'],
'braces_position' => ['classes_opening_brace' => 'same_line', 'control_structures_opening_brace' => 'same_line', 'functions_opening_brace' => 'same_line'],
]
)->setFinder(
PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
)->setCacheFile('./cache/.php-cs-fixer.cache');