-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs
48 lines (42 loc) · 1.25 KB
/
.php_cs
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
<?php
$header = <<<'HEADER'
This file is part of bhittani/container.
(c) Kamal Khan <shout@bhittani.com>
For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
HEADER;
$rules = [
'@PSR2' => true,
'@Symfony' => true,
'yoda_style' => false,
'phpdoc_order' => true,
'no_useless_else' => true,
'new_with_braces' => false,
'heredoc_to_nowdoc' => true,
'no_short_echo_tag' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'single_line_after_imports' => true,
'combine_consecutive_unsets' => true,
'header_comment' => compact('header'),
'array_syntax' => ['syntax' => 'short'],
'not_operator_with_successor_space' => true,
'phpdoc_add_missing_param_annotation' => true,
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'no_extra_consecutive_blank_lines' => [
'use',
'extra',
'break',
'throw',
'return',
'continue',
'curly_brace_block',
'square_brace_block',
'parenthesis_brace_block',
],
];
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src');
return PhpCsFixer\Config::create()
->setRules($rules)
->setFinder($finder);