| Conditions | 2 |
| Paths | 2 |
| Total Lines | 30 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 12 | ||
| Bugs | 1 | Features | 3 |
| 1 | <?php |
||
| 26 | public function __construct( |
||
| 27 | Iterator|Closure $origin, |
||
| 28 | AddingIterator $target = new ArrayAddingIterator() |
||
| 29 | ) { |
||
| 30 | $reorigin = ($origin instanceof Closure) ? $origin() : $origin; |
||
| 31 | parent::__construct( |
||
| 32 | /** @phpstan-ignore-next-line */ |
||
| 33 | new ContextVeil( |
||
| 34 | $target, |
||
| 35 | /** |
||
| 36 | * @todo #196:60min There are phpstan issues with |
||
| 37 | * ClosureReaction here and in ContextVeilTest. Now they are |
||
| 38 | * fixed by ignore-line stubs but need to be fixed according |
||
| 39 | * to phpstan ruleset. |
||
| 40 | */ |
||
| 41 | /** @phpstan-ignore-next-line */ |
||
| 42 | new ClosureReaction( |
||
| 43 | /** |
||
| 44 | * @phpstan-param AddingIterator<TKey, TValue> $stored |
||
| 45 | * Iterator for value storage. |
||
| 46 | */ |
||
| 47 | fn (AddingIterator $stored) => (new ValidTernary( |
||
| 48 | $reorigin, |
||
| 49 | function (Iterator $source) use ($stored) { |
||
| 50 | $temp = $stored->from($source); |
||
| 51 | $source->next(); |
||
| 52 | return $temp; |
||
| 53 | }, |
||
| 54 | fn () => $stored |
||
| 55 | ))->value() |
||
| 56 | ) |
||
| 61 |