-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
45 lines (41 loc) · 1.38 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
<?php
use PhpCsFixer\Config;
$finder = PhpCsFixer\Finder::create()
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
->exclude(['vendor'])
->in(__DIR__)
;
$config = new Config();
return $config
->setRules([
'@PSR1' => true,
'@PSR12' => true,
'strict_param' => true,
'strict_comparison' => true,
'declare_strict_types' => true,
'fully_qualified_strict_types' => true,
'native_function_invocation' => ['include' => ['@internal'], 'scope' => 'all', 'strict' => true],
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => ['statements' => ['return', 'throw', 'break', 'continue']],
'general_phpdoc_tag_rename' => ['replacements' => [
'inheritDocs' => 'inheritDoc',
'inheritdocs' => 'inheritDoc',
'inheritdoc' => 'inheritDoc',
]],
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'allow_unused_params' => true,
],
'no_unneeded_curly_braces' => [
'namespaces' => true,
],
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
],
])
->setIndent(' ')
->setLineEnding("\n")
->setFinder($finder)
;