forked from php-tui/php-tui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
44 lines (40 loc) · 1.15 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
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = Finder::create()
->in('example')
->in('src')
->in('tests')
;
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,
])
->setFinder($finder)
;