-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.php-cs-fixer.php
50 lines (44 loc) · 1.24 KB
/
.php-cs-fixer.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;
$rules = [
'@Symfony' => true,
'@PHP56Migration:risky' => true,
'array_push' => true,
'ordered_imports' => [
'imports_order' => [
'class', 'function', 'const',
],
'sort_algorithm' => 'length',
],
'no_leading_import_slash' => true,
'return_assignment' => true,
'phpdoc_no_empty_return' => true,
'no_blank_lines_after_phpdoc' => true,
'general_phpdoc_tag_rename' => true,
'phpdoc_inline_tag_normalizer' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'no_useless_else' => true,
'lowercase_keywords' => true,
'modernize_types_casting' => true,
'no_short_bool_cast' => true,
'no_php4_constructor' => true,
'php_unit_construct' => [
'assertions' => ['assertSame', 'assertEquals', 'assertNotEquals', 'assertNotSame'],
],
];
$finder = Finder::create()
->in([
__DIR__.'/src',
__DIR__.'/tests',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$config = new Config();
return $config->setFinder($finder)
->setRules($rules)
->setRiskyAllowed(true)
->setUsingCache(true);