| Conditions | 5 | 
| Paths | 5 | 
| Total Lines | 29 | 
| Code Lines | 19 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 30 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 12 | #[Override]  | 
            ||
| 13 | public function getConsumption(  | 
            ||
| 14 | array $production,  | 
            ||
| 15 | ColonyInterface $colony  | 
            ||
| 16 |     ): array { | 
            ||
| 17 | $depositMinings = $colony->getUserDepositMinings();  | 
            ||
| 18 | $storages = $colony->getStorage();  | 
            ||
| 19 | $ret = [];  | 
            ||
| 20 |         foreach ($production as $commodityId => $productionItem) { | 
            ||
| 21 | $proc = $productionItem->getProduction();  | 
            ||
| 22 |             if ($proc >= 0) { | 
            ||
| 23 | continue;  | 
            ||
| 24 | }  | 
            ||
| 25 | |||
| 26 | $commodity = $productionItem->getCommodity();  | 
            ||
| 27 | $ret[$commodityId]['commodity'] = $commodity;  | 
            ||
| 28 | $ret[$commodityId]['production'] = $productionItem->getProduction();  | 
            ||
| 29 | |||
| 30 |             if (array_key_exists($commodityId, $depositMinings)) { | 
            ||
| 31 | $deposit = $depositMinings[$commodityId];  | 
            ||
| 32 | $ret[$commodityId]['turnsleft'] = (int) floor($deposit->getAmountLeft() / abs($proc));  | 
            ||
| 33 |             } else { | 
            ||
| 34 | $storage = $storages->get($commodityId);  | 
            ||
| 35 | $stored = $storage !== null ? $storage->getAmount() : 0;  | 
            ||
| 36 | $ret[$commodityId]['turnsleft'] = (int) floor($stored / abs($proc));  | 
            ||
| 37 | }  | 
            ||
| 38 | }  | 
            ||
| 39 | |||
| 40 | return $ret;  | 
            ||
| 41 | }  | 
            ||
| 43 | 
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