Skip to content

Commit d0a777f

Browse files
committed
Migrate to new php-cs-fixer
1 parent 9e69b1d commit d0a777f

File tree

2 files changed

+6
-106
lines changed

2 files changed

+6
-106
lines changed

.php_cs

Lines changed: 5 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,11 @@
11
<?php
22

3-
$finder = Symfony\CS\Finder::create()
3+
$finder = \PhpCsFixer\Finder::create()
44
->in(__DIR__ . '/src')
55
->in(__DIR__ . '/tests');
66

7-
return Symfony\CS\Config::create()
8-
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
9-
->fixers([
10-
// Symfony level fixers
11-
'array_element_no_space_before_comma',
12-
'array_element_white_space_after_comma',
13-
'blankline_after_open_tag',
14-
// 'concat_without_spaces',
15-
'declare_equal_normalize',
16-
'double_arrow_multiline_whitespaces',
17-
'duplicate_semicolon',
18-
'extra_empty_lines',
19-
'function_typehint_space',
20-
'hash_to_slash_comment',
21-
'heredoc_to_nowdoc',
22-
'include',
23-
'join_function',
24-
'list_commas',
25-
'lowercase_cast',
26-
'method_argument_default_value',
27-
'multiline_array_trailing_comma',
28-
'namespace_no_leading_whitespace',
29-
'native_function_casing',
30-
'new_with_braces',
31-
'no_blank_lines_after_class_opening',
32-
'no_empty_comment',
33-
'no_empty_lines_after_phpdocs',
34-
'no_empty_phpdoc',
35-
'no_empty_statement',
36-
'object_operator',
37-
'operators_spaces',
38-
'php_unit_fqcn_annotation',
39-
'phpdoc_annotation_without_dot',
40-
'phpdoc_indent',
41-
'phpdoc_inline_tag',
42-
'phpdoc_no_access',
43-
// 'phpdoc_no_empty_return',
44-
'phpdoc_no_package',
45-
// 'phpdoc_params',
46-
'phpdoc_scalar',
47-
// 'phpdoc_separation',
48-
'phpdoc_short_description',
49-
'phpdoc_single_line_var_spacing',
50-
'phpdoc_to_comment',
51-
'phpdoc_trim',
52-
'phpdoc_type_to_var',
53-
'phpdoc_types',
54-
'phpdoc_var_without_name',
55-
// 'pre_increment',
56-
'print_to_echo',
57-
'remove_leading_slash_use',
58-
'remove_lines_between_uses',
59-
// 'return',
60-
'self_accessor',
61-
'short_bool_cast',
62-
'short_scalar_cast',
63-
'single_array_no_trailing_comma',
64-
'single_blank_line_before_namespace',
65-
'single_quote',
66-
'spaces_after_semicolon',
67-
'spaces_before_semicolon',
68-
'spaces_cast',
69-
'standardize_not_equal',
70-
'ternary_spaces',
71-
'trim_array_spaces',
72-
// 'unalign_double_arrow',
73-
'unalign_equals',
74-
// 'unary_operators_spaces',
75-
'unneeded_control_parentheses',
76-
'unused_use',
77-
'whitespacy_lines',
78-
79-
// Contrib level fixers
80-
// 'align_double_arrow',
81-
// 'align_equals',
82-
// 'class_keyword_remove',
83-
'combine_consecutive_unsets',
84-
'concat_with_spaces',
85-
// 'echo_to_print',
86-
// 'empty_return',
87-
'ereg_to_preg',
88-
// 'header_comment',
89-
// 'logical_not_operators_with_spaces',
90-
// 'logical_not_operators_with_successor_space',
91-
// 'long_array_syntax',
92-
// 'mb_str_functions',
93-
'multiline_spaces_before_semicolon',
94-
// 'newline_after_open_tag',
95-
// 'no_blank_lines_before_namespace',
96-
'no_useless_else',
97-
'no_useless_return',
98-
'ordered_use',
99-
'php4_constructor',
100-
'php_unit_construct',
101-
'php_unit_dedicate_assert',
102-
'php_unit_strict',
103-
// 'phpdoc_order',
104-
// 'phpdoc_var_to_type',
105-
// 'protected_to_private',
106-
'short_array_syntax',
107-
'short_echo_tag',
108-
// 'silenced_deprecation_error',
109-
'strict',
110-
'strict_param',
7+
return \PhpCsFixer\Config::create()
8+
->setRules([
9+
'@PSR2' => true,
11110
])
112-
->finder($finder);
11+
->setFinder($finder);

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dist: trusty
55
php:
66
- 5.6
77
- 7.0
8+
- 7.1
89
- hhvm
910

1011
cache:

0 commit comments

Comments
 (0)