| Conditions | 15 | 
| Paths | 3 | 
| Total Lines | 32 | 
| Code Lines | 22 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 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 | ||
| 28 | public static function mergeConfig(): array | ||
| 29 |     { | ||
| 30 | $args = \func_get_args(); | ||
| 31 | $res = array_shift($args) ?: []; | ||
| 32 |         foreach ($args as $items) { | ||
| 33 |             if (!\is_array($items)) { | ||
| 34 | continue; | ||
| 35 | } | ||
| 36 |             foreach ($items as $k => $v) { | ||
| 37 |                 if ($v instanceof \yii\helpers\UnsetArrayValue || $v instanceof \Yiisoft\Arrays\UnsetArrayValue) { | ||
| 38 | unset($res[$k]); | ||
| 39 |                 } elseif ($v instanceof \yii\helpers\ReplaceArrayValue || $v instanceof \Yiisoft\Arrays\ReplaceArrayValue) { | ||
| 40 | $res[$k] = $v->value; | ||
| 41 |                 } elseif (\is_int($k)) { | ||
| 42 | /// XXX skip repeated values | ||
| 43 |                     if (\in_array($v, $res, true))  { | ||
| 44 | continue; | ||
| 45 | } | ||
| 46 |                     if (isset($res[$k])) { | ||
| 47 | $res[] = $v; | ||
| 48 |                     } else { | ||
| 49 | $res[$k] = $v; | ||
| 50 | } | ||
| 51 |                 } elseif (\is_array($v) && isset($res[$k]) && \is_array($res[$k])) { | ||
| 52 | $res[$k] = self::mergeConfig($res[$k], $v); | ||
| 53 |                 } else { | ||
| 54 | $res[$k] = $v; | ||
| 55 | } | ||
| 56 | } | ||
| 57 | } | ||
| 58 | |||
| 59 | return $res; | ||
| 60 | } | ||
| 125 | 
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