1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | /* |
||
6 | * This file is part of DivineNii opensource projects. |
||
7 | * |
||
8 | * PHP version 7.4 and above required |
||
9 | * |
||
10 | * @author Divine Niiquaye Ibok <[email protected]> |
||
11 | * @copyright 2021 DivineNii (https://divinenii.com/) |
||
12 | * @license https://opensource.org/licenses/BSD-3-Clause License |
||
13 | * |
||
14 | * For the full copyright and license information, please view the LICENSE |
||
15 | * file that was distributed with this source code. |
||
16 | */ |
||
17 | |||
18 | $header = <<<'EOF' |
||
19 | This file is part of DivineNii opensource projects. |
||
20 | |||
21 | PHP version 7.4 and above required |
||
22 | |||
23 | @author Divine Niiquaye Ibok <[email protected]> |
||
24 | @copyright 2021 DivineNii (https://divinenii.com/) |
||
25 | @license https://opensource.org/licenses/BSD-3-Clause License |
||
26 | |||
27 | For the full copyright and license information, please view the LICENSE |
||
28 | file that was distributed with this source code. |
||
29 | EOF; |
||
30 | |||
31 | return (new PhpCsFixer\Config()) |
||
0 ignored issues
–
show
|
|||
32 | ->setRiskyAllowed(true) |
||
33 | ->setFinder((new PhpCsFixer\Finder())->append([__FILE__])) |
||
0 ignored issues
–
show
The type
PhpCsFixer\Finder was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
34 | ->setRules([ |
||
35 | '@PSR12' => true, |
||
36 | //'DoctrineAnnotation' => true, |
||
37 | 'header_comment' => ['header' => $header], |
||
38 | 'general_phpdoc_tag_rename' => [ |
||
39 | 'replacements' => [ |
||
40 | 'inheritDocs' => 'inheritDoc', |
||
41 | 'inheritDoc' => 'inheritdoc', |
||
42 | ], |
||
43 | ], |
||
44 | 'backtick_to_shell_exec' => true, |
||
45 | 'no_mixed_echo_print' => true, |
||
46 | 'array_syntax' => ['syntax' => 'short'], |
||
47 | 'no_multiline_whitespace_around_double_arrow' => true, |
||
48 | 'no_trailing_comma_in_singleline_array' => true, |
||
49 | 'no_whitespace_before_comma_in_array' => true, |
||
50 | 'normalize_index_brace' => true, |
||
51 | 'trailing_comma_in_multiline' => true, |
||
52 | 'trim_array_spaces' => true, |
||
53 | 'whitespace_after_comma_in_array' => true, |
||
54 | 'native_function_type_declaration_casing' => true, |
||
55 | 'braces' => [ |
||
56 | 'allow_single_line_anonymous_class_with_empty_body' => true, |
||
57 | 'allow_single_line_closure' => true, |
||
58 | ], |
||
59 | 'magic_constant_casing' => true, |
||
60 | 'magic_method_casing' => true, |
||
61 | 'native_function_casing' => true, |
||
62 | 'cast_spaces' => true, |
||
63 | 'no_short_bool_cast' => true, |
||
64 | 'no_unset_cast' => true, |
||
65 | 'short_scalar_cast' => true, |
||
66 | 'class_attributes_separation' => true, |
||
67 | 'protected_to_private' => false, |
||
68 | 'no_empty_comment' => true, |
||
69 | 'single_line_comment_style' => true, |
||
70 | 'native_constant_invocation' => true, |
||
71 | 'include' => true, |
||
72 | 'no_alternative_syntax' => true, |
||
73 | 'no_superfluous_elseif' => true, |
||
74 | 'no_trailing_comma_in_list_call' => true, |
||
75 | 'no_unneeded_control_parentheses' => true, |
||
76 | 'no_unneeded_curly_braces' => true, |
||
77 | 'no_useless_else' => true, |
||
78 | //'switch_continue_to_break' => true, |
||
79 | 'yoda_style' => true, |
||
80 | 'combine_nested_dirname' => true, |
||
81 | 'function_typehint_space' => true, |
||
82 | 'lambda_not_used_import' => true, |
||
83 | 'native_function_invocation' => [ |
||
84 | 'include' => ['@compiler_optimized', '@all'], |
||
85 | 'scope' => 'namespaced', |
||
86 | 'strict' => true, |
||
87 | ], |
||
88 | //'single_line_throw' => true, |
||
89 | //'use_arrow_functions' => true, |
||
90 | 'void_return' => true, |
||
91 | //'global_namespace_import' => true, |
||
92 | 'no_unused_imports' => true, |
||
93 | 'single_import_per_statement' => false, |
||
94 | 'combine_consecutive_issets' => true, |
||
95 | 'combine_consecutive_unsets' => true, |
||
96 | 'dir_constant' => true, |
||
97 | 'function_to_constant' => true, |
||
98 | 'is_null' => true, |
||
99 | 'no_unset_on_property' => true, |
||
100 | 'single_space_after_construct' => true, |
||
101 | 'clean_namespace' => true, |
||
102 | 'no_leading_namespace_whitespace' => true, |
||
103 | 'binary_operator_spaces' => true, |
||
104 | 'concat_space' => ['spacing' => 'one'], |
||
105 | 'increment_style' => true, |
||
106 | 'object_operator_without_whitespace' => true, |
||
107 | 'standardize_increment' => true, |
||
108 | 'standardize_not_equals' => true, |
||
109 | 'ternary_to_null_coalescing' => true, |
||
110 | 'unary_operator_spaces' => true, |
||
111 | 'echo_tag_syntax' => true, |
||
112 | 'linebreak_after_opening_tag' => true, |
||
113 | 'align_multiline_comment' => true, |
||
114 | 'no_blank_lines_after_phpdoc' => true, |
||
115 | 'php_unit_construct' => true, |
||
116 | 'php_unit_fqcn_annotation' => true, |
||
117 | 'php_unit_method_casing' => true, |
||
118 | '@PHPUnit84Migration:risky' => true, |
||
119 | 'no_empty_phpdoc' => true, |
||
120 | 'no_superfluous_phpdoc_tags' => [ |
||
121 | 'allow_mixed' => true, |
||
122 | 'allow_unused_params' => true, |
||
123 | ], |
||
124 | 'phpdoc_align' => true, |
||
125 | 'phpdoc_annotation_without_dot' => true, |
||
126 | 'phpdoc_indent' => true, |
||
127 | 'phpdoc_inline_tag_normalizer' => true, |
||
128 | 'phpdoc_no_access' => true, |
||
129 | 'phpdoc_no_empty_return' => true, |
||
130 | 'phpdoc_no_package' => true, |
||
131 | 'phpdoc_no_useless_inheritdoc' => true, |
||
132 | 'phpdoc_order' => true, |
||
133 | 'phpdoc_return_self_reference' => true, |
||
134 | 'phpdoc_scalar' => true, |
||
135 | 'phpdoc_separation' => true, |
||
136 | 'phpdoc_single_line_var_spacing' => true, |
||
137 | 'phpdoc_summary' => true, |
||
138 | 'phpdoc_tag_type' => [ |
||
139 | 'tags' => [ |
||
140 | 'inheritdoc' => 'inline', |
||
141 | ], |
||
142 | ], |
||
143 | 'phpdoc_to_comment' => true, |
||
144 | 'phpdoc_trim' => true, |
||
145 | 'phpdoc_types' => true, |
||
146 | 'phpdoc_trim_consecutive_blank_line_separation' => true, |
||
147 | 'phpdoc_types_order' => [ |
||
148 | 'null_adjustment' => 'always_last', |
||
149 | 'sort_algorithm' => 'none', |
||
150 | ], |
||
151 | 'phpdoc_var_without_name' => true, |
||
152 | 'return_assignment' => true, |
||
153 | //'simplified_null_return' => true, |
||
154 | //'no_empty_statement' => true, |
||
155 | //'no_singleline_whitespace_before_semicolons' => true, |
||
156 | 'semicolon_after_instruction' => true, |
||
157 | 'space_after_semicolon' => [ |
||
158 | 'remove_in_empty_for_expressions' => true, |
||
159 | ], |
||
160 | 'declare_strict_types' => true, |
||
161 | 'single_quote' => true, |
||
162 | 'array_indentation' => true, |
||
163 | 'blank_line_before_statement' => [ |
||
164 | 'statements' => [ |
||
165 | 'break', |
||
166 | 'continue', |
||
167 | 'declare', |
||
168 | 'do', |
||
169 | 'for', |
||
170 | 'foreach', |
||
171 | 'if', |
||
172 | 'include', |
||
173 | 'include_once', |
||
174 | 'require', |
||
175 | 'require_once', |
||
176 | 'return', |
||
177 | 'switch', |
||
178 | 'throw', |
||
179 | 'try', |
||
180 | 'while', |
||
181 | 'yield', |
||
182 | ], |
||
183 | ], |
||
184 | 'no_extra_blank_lines' => true, |
||
185 | 'no_spaces_around_offset' => true, |
||
186 | 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false], |
||
187 | |||
188 | // Risky standard |
||
189 | //'@PSR12:risky' => true, |
||
190 | //'group_import' => true, |
||
191 | //'ordered_traits' => true, |
||
192 | //'self_accessor' => true, |
||
193 | //'array_push' => true, |
||
194 | //'logical_operators' => true, |
||
195 | //'set_type_to_cast' => true, |
||
196 | //'modernize_types_casting' => true, |
||
197 | //'no_null_property_initialization' => true, |
||
198 | //'no_php4_constructor' => true, |
||
199 | //'no_unneeded_final_method' => true, |
||
200 | //'psr_autoloading' => true, |
||
201 | //'non_printable_character' => ['use_escape_sequences_in_strings' => true] |
||
202 | ]); |
||
203 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths