| Conditions | 2 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 1 | public static function of(): Closure |
|
| 22 | { |
||
| 23 | return |
||
| 24 | /** |
||
| 25 | * @psalm-param iterable<T> $iterable |
||
| 26 | * @psalm-return ?T |
||
| 27 | */ |
||
| 28 | 1 | static function (iterable $iterable) { |
|
| 29 | 1 | $current = null; |
|
| 30 | |||
| 31 | 1 | foreach ($iterable as $current) { |
|
| 32 | 1 | break; |
|
| 33 | } |
||
| 34 | |||
| 35 | 1 | return $current; |
|
| 36 | 1 | }; |
|
| 39 |