| 
10 | 10 | 
 
  | 
11 | 11 | use PhpCsFixer\Config as ConfigBase;  | 
12 | 12 | 
 
  | 
 | 13 | +/**  | 
 | 14 | + * @deprecated 1.3.0 The "Config" class has been deprecated, will be removed in 2.0. Use RuleSetInterface or InternalConfigFactory instead.  | 
 | 15 | + */  | 
13 | 16 | class Config extends ConfigBase  | 
14 | 17 | {  | 
15 |  | -    /**  | 
16 |  | -     * @param string $name  | 
17 |  | -     */  | 
18 |  | -    public function __construct($name = 'default')  | 
 | 18 | +    public function __construct(string $name = 'default')  | 
19 | 19 |     {  | 
20 | 20 |         parent::__construct($name);  | 
21 | 21 | 
 
  | 
22 | 22 |         $this->setRiskyAllowed(true);  | 
23 |  | -        $this->setRules([  | 
24 |  | -            'declare_strict_types' => true,  | 
25 |  | -            'encoding' => true,  | 
26 |  | -            'full_opening_tag' => true,  | 
27 |  | -            'blank_line_after_namespace' => true,  | 
28 |  | -            'elseif' => true,  | 
29 |  | -            'function_declaration' => true,  | 
30 |  | -            'indentation_type' => true,  | 
31 |  | -            'line_ending' => true,  | 
32 |  | -            'constant_case' => ['case' => 'lower'],  | 
33 |  | -            'lowercase_keywords' => true,  | 
34 |  | -            'no_closing_tag' => true,  | 
35 |  | -            'no_spaces_after_function_name' => true,  | 
36 |  | -            'no_spaces_inside_parenthesis' => true,  | 
37 |  | -            'no_trailing_whitespace' => true,  | 
38 |  | -            'no_trailing_whitespace_in_comment' => true,  | 
39 |  | -            'single_blank_line_at_eof' => true,  | 
40 |  | -            'single_import_per_statement' => true,  | 
41 |  | -            'single_line_after_imports' => true,  | 
42 |  | -            'switch_case_semicolon_to_colon' => true,  | 
43 |  | -            'switch_case_space' => true,  | 
44 |  | -            'visibility_required' => true,  | 
45 |  | -            'binary_operator_spaces' => true,  | 
46 |  | -            'blank_line_before_statement' => [  | 
47 |  | -                'statements' => ['return'],  | 
48 |  | -            ],  | 
49 |  | -            'braces' => [  | 
50 |  | -                'allow_single_line_closure' => true,  | 
51 |  | -            ],  | 
52 |  | -            'class_attributes_separation' => [  | 
53 |  | -                'elements' => [  | 
54 |  | -                    'method' => 'one',  | 
55 |  | -                    'property' => 'one',  | 
56 |  | -                ],  | 
57 |  | -            ],  | 
58 |  | -            'declare_equal_normalize' => true,  | 
59 |  | -            'function_typehint_space' => true,  | 
60 |  | -            'include' => true,  | 
61 |  | -            'increment_style' => true,  | 
62 |  | -            'lowercase_cast' => true,  | 
63 |  | -            'lowercase_static_reference' => true,  | 
64 |  | -            'magic_constant_casing' => true,  | 
65 |  | -            'magic_method_casing' => true,  | 
66 |  | -            'method_argument_space' => true,  | 
67 |  | -            'native_function_casing' => true,  | 
68 |  | -            'native_function_type_declaration_casing' => true,  | 
69 |  | -            'new_with_braces' => true,  | 
70 |  | -            'no_blank_lines_after_class_opening' => true,  | 
71 |  | -            'no_blank_lines_after_phpdoc' => true,  | 
72 |  | -            'no_empty_comment' => true,  | 
73 |  | -            'no_empty_phpdoc' => true,  | 
74 |  | -            'no_empty_statement' => true,  | 
75 |  | -            'no_extra_blank_lines' => ['tokens' => [  | 
76 |  | -                'curly_brace_block',  | 
77 |  | -                'extra',  | 
78 |  | -                'parenthesis_brace_block',  | 
79 |  | -                'square_brace_block',  | 
80 |  | -                'throw',  | 
81 |  | -                'use',  | 
82 |  | -            ]],  | 
83 |  | -            'no_leading_import_slash' => true,  | 
84 |  | -            'no_leading_namespace_whitespace' => true,  | 
85 |  | -            'no_mixed_echo_print' => true,  | 
86 |  | -            'no_multiline_whitespace_around_double_arrow' => true,  | 
87 |  | -            'no_short_bool_cast' => true,  | 
88 |  | -            'no_singleline_whitespace_before_semicolons' => true,  | 
89 |  | -            'no_spaces_around_offset' => true,  | 
90 |  | -            'no_trailing_comma_in_list_call' => true,  | 
91 |  | -            'no_trailing_comma_in_singleline_array' => true,  | 
92 |  | -            'no_unneeded_control_parentheses' => true,  | 
93 |  | -            'no_unneeded_curly_braces' => true,  | 
94 |  | -            'no_unneeded_final_method' => true,  | 
95 |  | -            'no_unused_imports' => true,  | 
96 |  | -            'no_whitespace_before_comma_in_array' => true,  | 
97 |  | -            'no_whitespace_in_blank_line' => true,  | 
98 |  | -            'normalize_index_brace' => true,  | 
99 |  | -            'object_operator_without_whitespace' => true,  | 
100 |  | -            'php_unit_fqcn_annotation' => true,  | 
101 |  | -            'phpdoc_annotation_without_dot' => false,  | 
102 |  | -            'phpdoc_indent' => true,  | 
103 |  | -            'phpdoc_inline_tag_normalizer' => true,  | 
104 |  | -            'phpdoc_tag_type' => [  | 
105 |  | -                'tags' => [  | 
106 |  | -                    'inheritdoc' => 'inline',  | 
107 |  | -                ],  | 
108 |  | -            ],  | 
109 |  | -            'general_phpdoc_tag_rename' => true,  | 
110 |  | -            'phpdoc_no_access' => true,  | 
111 |  | -            'phpdoc_no_alias_tag' => [  | 
112 |  | -                'replacements' => [  | 
113 |  | -                    'type' => 'var',  | 
114 |  | -                ],  | 
115 |  | -            ],  | 
116 |  | -            'phpdoc_no_empty_return' => true,  | 
117 |  | -            'phpdoc_no_package' => true,  | 
118 |  | -            'phpdoc_no_useless_inheritdoc' => true,  | 
119 |  | -            'phpdoc_return_self_reference' => true,  | 
120 |  | -            'phpdoc_scalar' => true,  | 
121 |  | -            'phpdoc_separation' => true,  | 
122 |  | -            'phpdoc_single_line_var_spacing' => true,  | 
123 |  | -            'phpdoc_summary' => true,  | 
124 |  | -            'phpdoc_trim' => true,  | 
125 |  | -            'phpdoc_types' => true,  | 
126 |  | -            'phpdoc_var_without_name' => true,  | 
127 |  | -            'protected_to_private' => true,  | 
128 |  | -            'return_type_declaration' => true,  | 
129 |  | -            'semicolon_after_instruction' => true,  | 
130 |  | -            'short_scalar_cast' => true,  | 
131 |  | -            'single_class_element_per_statement' => true,  | 
132 |  | -            'single_line_comment_style' => [  | 
133 |  | -                'comment_types' => ['hash'],  | 
134 |  | -            ],  | 
135 |  | -            'single_quote' => true,  | 
136 |  | -            'single_trait_insert_per_statement' => true,  | 
137 |  | -            'standardize_increment' => true,  | 
138 |  | -            'standardize_not_equals' => true,  | 
139 |  | -            'ternary_operator_spaces' => true,  | 
140 |  | -            'trailing_comma_in_multiline' => true,  | 
141 |  | -            'trim_array_spaces' => true,  | 
142 |  | -            'unary_operator_spaces' => true,  | 
143 |  | -            'whitespace_after_comma_in_array' => true,  | 
144 |  | -            'dir_constant' => true,  | 
145 |  | -            'ereg_to_preg' => true,  | 
146 |  | -            'error_suppression' => true,  | 
147 |  | -            'fopen_flag_order' => true,  | 
148 |  | -            'fopen_flags' => false,  | 
149 |  | -            'function_to_constant' => true,  | 
150 |  | -            'implode_call' => true,  | 
151 |  | -            'is_null' => true,  | 
152 |  | -            'modernize_types_casting' => true,  | 
153 |  | -            'native_constant_invocation' => [  | 
154 |  | -                'fix_built_in' => false,  | 
155 |  | -                'include' => [  | 
156 |  | -                    'DIRECTORY_SEPARATOR',  | 
157 |  | -                    'PHP_SAPI',  | 
158 |  | -                    'PHP_VERSION_ID',  | 
159 |  | -                ],  | 
160 |  | -                'scope' => 'namespaced',  | 
161 |  | -            ],  | 
162 |  | -            'no_alias_functions' => true,  | 
163 |  | -            'no_homoglyph_names' => true,  | 
164 |  | -            'non_printable_character' => true,  | 
165 |  | -            'php_unit_construct' => true,  | 
166 |  | -            'psr_autoloading' => true,  | 
167 |  | -            'set_type_to_cast' => true,  | 
168 |  | -            'concat_space' => ['spacing' => 'one'],  | 
169 |  | -            'array_syntax' => ['syntax' => 'short'],  | 
170 |  | -            'simplified_null_return' => false,  | 
171 |  | -            'phpdoc_align' => false,  | 
172 |  | -            'phpdoc_to_comment' => false,  | 
173 |  | -            'cast_spaces' => false,  | 
174 |  | -            'blank_line_after_opening_tag' => false,  | 
175 |  | -            'single_blank_line_before_namespace' => true,  | 
176 |  | -            'space_after_semicolon' => false,  | 
177 |  | -            'native_function_invocation' => false,  | 
178 |  | -            'phpdoc_types_order' => [  | 
179 |  | -                'null_adjustment' => 'always_last',  | 
180 |  | -                'sort_algorithm' => 'none',  | 
181 |  | -            ],  | 
182 |  | -            'php_unit_mock_short_will_return' => false,  | 
183 |  | -            'yoda_style' => false,  | 
184 |  | -            'no_break_comment' => false,  | 
185 |  | -            'self_accessor' => false,  | 
186 |  | -            'static_lambda' => true,  | 
187 |  | -            'ordered_imports' => true,  | 
188 |  | -        ]);  | 
 | 23 | +        $ruleSet = new Sets\Ibexa46RuleSet();  | 
 | 24 | +        $this->setRules($ruleSet->getRules());  | 
189 | 25 |     }  | 
190 | 26 | }  | 
0 commit comments