| Conditions | 5 |
| Paths | 7 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | protected static function get($items) { |
||
| 46 | if (is_array($items)) |
||
| 47 | { |
||
| 48 | $max = 0; |
||
| 49 | foreach ($items as $key => $value) { |
||
| 50 | $max += $value; |
||
| 51 | $items[$key] = $max; |
||
| 52 | } |
||
| 53 | |||
| 54 | $random = mt_rand(1, $max); |
||
| 55 | |||
| 56 | foreach ($items as $item => $max) |
||
| 57 | { |
||
| 58 | if ($random <= $max) { |
||
| 59 | break; |
||
| 60 | } |
||
| 61 | } |
||
| 62 | return $item; |
||
| 63 | } else { |
||
| 64 | throw new Exception('Parameter must be an array.'); |
||
| 65 | |||
| 66 | return false; |
||
| 67 | } |
||
| 70 | } |
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