-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php
46 lines (41 loc) · 1.36 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
<?php declare(strict_types=1);
$header = <<<'EOF'
This file is part of ksaveras/circuit-breaker.
(c) Ksaveras Sakys <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$finder = PhpCsFixer\Finder::create()
->in([__DIR__.'/src', __DIR__.'/tests'])
;
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => false,
'blank_line_before_statement' => [
'statements' => [
'break',
'continue',
'return',
'switch',
'throw',
'try',
],
],
'blank_lines_before_namespace' => false,
'declare_strict_types' => true,
'fopen_flags' => true,
'header_comment' => ['header' => $header, 'separate' => 'none'],
'linebreak_after_opening_tag' => false,
'method_chaining_indentation' => true,
'no_useless_else' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'ordered_imports' => true,
'php_unit_mock' => true,
'protected_to_private' => false,
])
->setFinder($finder);