-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.php_cs.php
More file actions
46 lines (41 loc) · 1.36 KB
/
.php_cs.php
File metadata and controls
46 lines (41 loc) · 1.36 KB
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
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->exclude('runtime')
->exclude('bin')
->exclude('vendor')
->in(__DIR__);
return (new PhpCsFixer\Config)->setRules([
'@PSR2' => true,
'blank_line_after_opening_tag' => true,
'compact_nullable_typehint' => true,
'declare_equal_normalize' => ['space' => 'none'],
'function_typehint_space' => true,
'new_with_braces' => true,
'no_empty_statement' => true,
'no_unused_imports' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'return_type_declaration' => ['space_before' => 'none'],
'single_trait_insert_per_statement' => true,
'no_empty_phpdoc' => true,
'single_blank_line_before_namespace' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'length'],
'declare_strict_types' => true,
'class_attributes_separation' => [
'elements' => [
'const',
'method',
'property',
]
],
'blank_line_before_statement' => [
'statements' => [
'return',
]
],
])
->setFinder($finder)
->setRiskyAllowed(true);