-
Notifications
You must be signed in to change notification settings - Fork 3
/
.php-cs-fixer.dist.php
51 lines (47 loc) · 1.32 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
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = Finder::create()
->in('src')
->in('tests')
->exclude([
'Workspace',
'InternalStubs',
])
;
return (new Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'no_unused_imports' => true,
'phpdoc_to_property_type' => true,
'no_superfluous_phpdoc_tags' => [
'remove_inheritdoc' => true,
'allow_mixed' => true,
],
'class_attributes_separation' => [
'elements' => [
'const' => 'only_if_meta',
'property' => 'one',
'trait_import' => 'only_if_meta',
],
],
'ordered_class_elements' => true,
'no_empty_phpdoc' => true,
'phpdoc_trim' => true,
'array_syntax' => ['syntax' => 'short'],
'list_syntax' => ['syntax' => 'short'],
'void_return' => true,
'ordered_class_elements' => true,
'single_quote' => true,
'heredoc_indentation' => true,
'global_namespace_import' => true,
'no_trailing_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'new_with_parentheses' => [
'anonymous_class' => true,
'named_class' => true,
],
])
->setFinder($finder)
;