Conditions | 8 |
Paths | 8 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 72 |
Changes | 0 |
1 | <?php |
||
36 | public static function flt_fleet_speed($user, $fleet, $shipData = []) { |
||
37 | if (!is_array($fleet)) { |
||
38 | $fleet = array($fleet => 1); |
||
39 | } |
||
40 | |||
41 | $speeds = array(); |
||
42 | if (!empty($fleet)) { |
||
43 | foreach ($fleet as $ship_id => $amount) { |
||
44 | if ($amount && in_array($ship_id, sn_get_groups(['fleet', 'missile',]))) { |
||
45 | $single_ship_data = !empty($shipData[$ship_id]) ? $shipData[$ship_id] : get_ship_data($ship_id, $user); |
||
46 | $speeds[] = $single_ship_data['speed']; |
||
47 | } |
||
48 | } |
||
49 | } |
||
50 | |||
51 | return empty($speeds) ? 0 : min($speeds); |
||
52 | } |
||
55 |
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