-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.php-cs-fixer.dist.php
54 lines (50 loc) · 1.61 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
51
52
53
54
<?php
$config = new PhpCsFixer\Config();
$finder = PhpCsFixer\Finder::create();
$finder
// The vendor directory is excluded by default.
->exclude('.github')
->exclude('bin')
->exclude('build')
->exclude('docker')
->in(__DIR__)
;
$config
->setRiskyAllowed(true)
->setCacheFile('build/.php-cs-fixer/php_cs.json')
->setRules(
[
'@PSR12' => true,
'@PSR12:risky' => true,
'@PHP70Migration' => true,
'@PHP70Migration:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@Symfony:risky' => true,
'no_unused_imports' => true,
'ordered_imports' => true,
'ordered_class_elements' => true,
'strict_comparison' => true,
'native_constant_invocation' => false,
'php_unit_test_class_requires_covers' => true,
'php_unit_dedicate_assert_internal_type' => true,
'php_unit_mock' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'no_extra_blank_lines' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'location' => 'after_open',
'separate' => 'both',
'header' => <<<'HEADER'
This file is part of the streak package.
(C) Alan Gabriel Bem <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
HEADER
,
],
]
)
->setFinder($finder)
;
return $config;