-
Notifications
You must be signed in to change notification settings - Fork 5
/
.php_cs
87 lines (80 loc) · 2.37 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
/*
* Slim3 Doctrine integration (https://github.com/juliangut/slim-doctrine).
*
* @license BSD-3-Clause
* @link https://github.com/juliangut/slim-doctrine
* @author Julián Gutiérrez <[email protected]>
*/
use Symfony\CS\Config;
use Symfony\CS\Finder;
use Symfony\CS\Fixer\Contrib\HeaderCommentFixer;
use Symfony\CS\FixerInterface;
$header = <<<'HEADER'
Slim3 Doctrine integration (https://github.com/juliangut/slim-doctrine).
@license BSD-3-Clause
@link https://github.com/juliangut/slim-doctrine
@author Julián Gutiérrez <[email protected]>
HEADER;
HeaderCommentFixer::setHeader($header);
$finder = Finder::create()
->files()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->name('*.php');
return Config::create()
->level(FixerInterface::PSR2_LEVEL)
->setUsingCache(true)
->fixers([
'short_tag',
'header_comment',
'single_blank_line_before_namespace',
'unused_use',
'ordered_use',
'remove_leading_slash_use',
'remove_lines_between_uses',
'include',
'self_accessor',
'native_function_casing',
'newline_after_open_tag',
'whitespacy_lines',
'multiline_spaces_before_semicolon',
'spaces_before_semicolon',
'ereg_to_preg',
'empty_return',
'unneeded_control_parentheses',
'unary_operators_spaces',
'function_typehint_space',
'method_argument_default_value',
'trim_array_spaces',
'array_element_white_space_after_comma',
'short_array_syntax',
'multiline_array_trailing_comma',
'single_array_no_trailing_comma',
'single_quote',
'spaces_cast',
'short_scalar_cast ',
'concat_with_spaces',
'no_useless_else',
'no_empty_comment',
'phpdoc_indent',
'phpdoc_trim',
'phpdoc_to_comment',
'phpdoc_short_description',
'phpdoc_inline_tag',
'phpdoc_no_access',
'phpdoc_no_package',
'phpdoc_order',
'phpdoc_separation',
'phpdoc_var_without_name',
'phpdoc_types',
'phpdoc_type_to_var',
'phpdoc_scalar',
'phpdoc_single_line_var_spacing',
'phpdoc_params',
'phpdoc_no_empty_return',
'no_empty_lines_after_phpdocs',
'php_unit_construct',
'php_unit_dedicate_assert'
])
->finder($finder);