| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 53 | public function __invoke($data, callable $transformation = null) |
||
| 54 | { |
||
| 55 | if ($transformation) { |
||
| 56 | $clone = clone $this; |
||
| 57 | $clone->transformation = $transformation; |
||
| 58 | |||
| 59 | return $clone($data); |
||
| 60 | } |
||
| 61 | |||
| 62 | $this->context->push($data); |
||
| 63 | |||
| 64 | $result = ($this->transformation)($data, $this); |
||
| 65 | |||
| 66 | $this->context->pop(); |
||
| 67 | |||
| 68 | return $result; |
||
| 69 | } |
||
| 79 |