-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.php-cs-fixer.dist.php
33 lines (31 loc) · 1.08 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(['src', 'tests'])
;
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => true,
'concat_space' => ['spacing' => 'none'],
'declare_strict_types' => true,
'native_function_invocation' => ['include' => ['@internal']],
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true],
'protected_to_private' => true,
'strict_comparison' => true,
'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => true,
'yoda_style' => true,
])
->setFinder($finder)
;