| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | final class ClosureTransformer implements TransformerInterface |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var callable |
||
| 25 | */ |
||
| 26 | private $callback; |
||
| 27 | |||
| 28 | |||
| 29 | /** |
||
| 30 | * @param callable $callback |
||
| 31 | */ |
||
| 32 | 68 | public function __construct(callable $callback) |
|
| 33 | { |
||
| 34 | 68 | $this->callback = $callback; |
|
| 35 | 68 | } |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 28 | public function transformToHttp($value, ElementInterface $input) |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | 59 | public function transformFromHttp($value, ElementInterface $input) |
|
| 53 |