| Conditions | 3 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 2 | public function __invoke(): Closure |
|
| 24 | { |
||
| 25 | 2 | return |
|
| 26 | /** |
||
| 27 | * @return Closure(int|float=): Closure(int|float=): Closure(): Generator<int, int|float> |
||
| 28 | */ |
||
| 29 | 2 | static fn (float|int $start = 0.0): Closure => |
|
| 30 | /** |
||
| 31 | * @return Closure(int|float=): Closure(): Generator<int, int|float> |
||
| 32 | */ |
||
| 33 | 2 | static fn (float|int $end = INF): Closure => |
|
| 34 | /** |
||
| 35 | * @return Closure(): Generator<int, int|float> |
||
| 36 | */ |
||
| 37 | 2 | static fn (float|int $step = 1.0): Closure => |
|
| 38 | /** |
||
| 39 | * @return Generator<int, int|float> |
||
| 40 | */ |
||
| 41 | 2 | static function () use ($start, $end, $step): Generator { |
|
| 42 | 2 | for ($current = $start; $current < $end; $current += $step) { |
|
| 43 | 2 | yield (($intCurrent = (int) $current) === $current) ? $intCurrent : $current; |
|
| 44 | } |
||
| 48 |