| Conditions | 4 |
| Paths | 5 |
| Total Lines | 22 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | #[Override] |
||
| 13 | public function handle(): void |
||
| 14 | { |
||
| 15 | $entries = $this->locationMiningRepository->findDepletedEntries(); |
||
| 16 | |||
| 17 | foreach ($entries as $entry) { |
||
| 18 | $currentAmount = $entry->getActualAmount(); |
||
| 19 | $maxAmount = $entry->getMaxAmount(); |
||
| 20 | |||
| 21 | if ($currentAmount === 0) { |
||
| 22 | $newAmount = max(1, (int) ceil($maxAmount * 0.05)); |
||
| 23 | } else { |
||
| 24 | $newAmount = (int) ceil($currentAmount * 1.15); |
||
| 25 | } |
||
| 26 | |||
| 27 | if ($newAmount >= $maxAmount) { |
||
| 28 | $newAmount = $maxAmount; |
||
| 29 | $entry->setDepletedAt(null); |
||
| 30 | } |
||
| 31 | |||
| 32 | $entry->setActualAmount($newAmount); |
||
| 33 | $this->locationMiningRepository->save($entry); |
||
| 34 | } |
||
| 37 |
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