| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 116 | 
| Code Lines | 3 | 
| 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 | ||
| 225 | protected function updateMenu() | ||
| 226 |     { | ||
| 227 | // Add default admin menu | ||
| 228 | // TODO: Translate | ||
| 229 | $menu = Menu::find(1); | ||
| 230 |         $menu->data = json_decode('[ | ||
| 231 |             { | ||
| 232 | "color":"grey", | ||
| 233 | "nochildren":false, | ||
| 234 | "icon":"settings", | ||
| 235 | "translation":"Dashboard", | ||
| 236 | "label":"menu.dashboard", | ||
| 237 | "type":"module", | ||
| 238 | "route":"uccello.settings.dashboard", | ||
| 239 | "module":"settings", | ||
| 240 | "id":1 | ||
| 241 | }, | ||
| 242 |             { | ||
| 243 | "color":"green", | ||
| 244 | "nochildren":false, | ||
| 245 | "icon":"lock", | ||
| 246 | "label":"menu.security", | ||
| 247 | "type":"group", | ||
| 248 | "id":2, | ||
| 249 | "children":[ | ||
| 250 |                     { | ||
| 251 | "color":"grey", | ||
| 252 | "nochildren":false, | ||
| 253 | "icon":"person", | ||
| 254 | "translation":"Users", | ||
| 255 | "label":"user", | ||
| 256 | "type":"module", | ||
| 257 | "route":"uccello.list", | ||
| 258 | "module":"user", | ||
| 259 | "id":3 | ||
| 260 | }, | ||
| 261 |                     { | ||
| 262 | "color":"grey", | ||
| 263 | "nochildren":false, | ||
| 264 | "icon":"group", | ||
| 265 | "translation":"Group", | ||
| 266 | "label":"group", | ||
| 267 | "type":"module", | ||
| 268 | "route":"uccello.list", | ||
| 269 | "module":"group", | ||
| 270 | "id":4 | ||
| 271 | }, | ||
| 272 |                     { | ||
| 273 | "color":"grey", | ||
| 274 | "nochildren":false, | ||
| 275 | "icon":"domain", | ||
| 276 | "translation":"Domains", | ||
| 277 | "label":"domain", | ||
| 278 | "type":"module", | ||
| 279 | "route":"uccello.list", | ||
| 280 | "module":"domain", | ||
| 281 | "id":5 | ||
| 282 | }, | ||
| 283 |                     { | ||
| 284 | "color":"grey", | ||
| 285 | "nochildren":false, | ||
| 286 | "icon":"lock", | ||
| 287 | "translation":"Roles", | ||
| 288 | "label":"role", | ||
| 289 | "type":"module", | ||
| 290 | "route":"uccello.list", | ||
| 291 | "module":"role", | ||
| 292 | "id":6 | ||
| 293 | }, | ||
| 294 |                     { | ||
| 295 | "color":"grey", | ||
| 296 | "nochildren":false, | ||
| 297 | "icon":"lock", | ||
| 298 | "translation":"Profiles", | ||
| 299 | "label":"profile", | ||
| 300 | "type":"module", | ||
| 301 | "route":"uccello.list", | ||
| 302 | "module":"profile", | ||
| 303 | "id":7 | ||
| 304 | } | ||
| 305 | ] | ||
| 306 | }, | ||
| 307 |             { | ||
| 308 | "color":"green", | ||
| 309 | "nochildren":false, | ||
| 310 | "icon":"settings", | ||
| 311 | "label":"menu.settings", | ||
| 312 | "type":"group", | ||
| 313 | "id":7, | ||
| 314 | "children":[ | ||
| 315 |                     { | ||
| 316 | "color":"grey", | ||
| 317 | "nochildren":false, | ||
| 318 | "icon":"extension", | ||
| 319 | "translation":"Module manager", | ||
| 320 | "label":"module_manager.link", | ||
| 321 | "type":"module", | ||
| 322 | "route":"uccello.settings.module.manager", | ||
| 323 | "module":"settings", | ||
| 324 | "id":8 | ||
| 325 | }, | ||
| 326 |                     { | ||
| 327 | "color":"grey", | ||
| 328 | "nochildren":false, | ||
| 329 | "icon":"menu", | ||
| 330 | "translation":"Menu manager", | ||
| 331 | "label":"menu_manager.link", | ||
| 332 | "type":"module", | ||
| 333 | "route":"uccello.settings.menu.manager", | ||
| 334 | "module":"settings", | ||
| 335 | "id":9 | ||
| 336 | } | ||
| 337 | ] | ||
| 338 | } | ||
| 339 | ]'); | ||
| 340 | $menu->save(); | ||
| 341 | } | ||
| 344 | 
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