Total Complexity | 3 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | final class ValidTernary implements Scalar |
||
15 | { |
||
16 | /** |
||
17 | * Ctor. |
||
18 | * |
||
19 | * @template TKey |
||
20 | * @template TValue |
||
21 | * @phpstan-param Iterator<TKey, TValue> $origin |
||
22 | * @phpstan-param Closure(Iterator<TKey, TValue>):T $cons |
||
23 | * @phpstan-param Closure(Iterator<TKey, TValue>):T $alter |
||
24 | * @param Iterator $origin iterator which validity is checked. |
||
25 | * @param Closure $cons consequent path if iterator is valid. |
||
26 | * @param Closure $alter alternative path if iterator is not valid. |
||
27 | */ |
||
28 | public function __construct( |
||
53 | } |
||
54 | |||
55 | public function value(): mixed |
||
64 |