| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class NullTransformer implements TransformerInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var NullTransformer|null |
||
| 14 | */ |
||
| 15 | private static $instance; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * {@inheritdoc} |
||
| 19 | */ |
||
| 20 | 104 | public function transformToHttp($value, ElementInterface $input) |
|
| 21 | { |
||
| 22 | 104 | return $value; |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * {@inheritdoc} |
||
| 27 | */ |
||
| 28 | 320 | public function transformFromHttp($value, ElementInterface $input) |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get the null transformer instance |
||
| 35 | * |
||
| 36 | * @return static |
||
| 37 | */ |
||
| 38 | 626 | public static function instance(): self |
|
| 45 | } |
||
| 46 | } |
||
| 47 |