| Conditions | 1 |
| Paths | 1 |
| Total Lines | 65 |
| Code Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 108 | public function publishStateProvider(): array |
||
| 109 | { |
||
| 110 | return [ |
||
| 111 | [ |
||
| 112 | false, |
||
| 113 | 0, |
||
| 114 | [ |
||
| 115 | 'Page1', |
||
| 116 | 'Page2', |
||
| 117 | 'Page3', |
||
| 118 | 'Page4', |
||
| 119 | ], |
||
| 120 | [], |
||
| 121 | ], |
||
| 122 | [ |
||
| 123 | true, |
||
| 124 | 0, |
||
| 125 | [ |
||
| 126 | 'Page1', |
||
| 127 | 'Page2', |
||
| 128 | 'Page3', |
||
| 129 | 'Page4', |
||
| 130 | ], |
||
| 131 | [ |
||
| 132 | 'Page1', |
||
| 133 | 'Page2', |
||
| 134 | ], |
||
| 135 | ], |
||
| 136 | [ |
||
| 137 | false, |
||
| 138 | 1, |
||
| 139 | [ |
||
| 140 | 'Page1', |
||
| 141 | ], |
||
| 142 | [], |
||
| 143 | ], |
||
| 144 | [ |
||
| 145 | true, |
||
| 146 | 1, |
||
| 147 | [ |
||
| 148 | 'Page1', |
||
| 149 | ], |
||
| 150 | [ |
||
| 151 | 'Page1', |
||
| 152 | ], |
||
| 153 | ], |
||
| 154 | [ |
||
| 155 | false, |
||
| 156 | 2, |
||
| 157 | [ |
||
| 158 | 'Page1', |
||
| 159 | 'Page2', |
||
| 160 | ], |
||
| 161 | [], |
||
| 162 | ], |
||
| 163 | [ |
||
| 164 | true, |
||
| 165 | 2, |
||
| 166 | [ |
||
| 167 | 'Page1', |
||
| 168 | 'Page2', |
||
| 169 | ], |
||
| 170 | [ |
||
| 171 | 'Page1', |
||
| 172 | 'Page2', |
||
| 173 | ], |
||
| 199 |
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