| Total Complexity | 3 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class SimpleLoop implements LoopInterface |
||
| 8 | { |
||
| 9 | use SoftLimitTrait; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @param int $memorySoftLimit Soft RAM limit in bytes. The loop won't let you continue to execute the program if |
||
| 13 | * soft limit is reached. Zero means no limit. |
||
| 14 | */ |
||
| 15 | 14 | public function __construct(protected int $memorySoftLimit = 0) |
|
| 16 | { |
||
| 17 | 14 | } |
|
| 18 | |||
| 19 | 4 | public function canContinue(): bool |
|
| 22 | } |
||
| 23 | |||
| 24 | 4 | protected function getMemoryLimit(): int |
|
| 29 |