| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class Result implements ResultInterface |
||
| 11 | { |
||
| 12 | |||
| 13 | private $value; |
||
| 14 | |||
| 15 | private $encoder; |
||
| 16 | |||
| 17 | private $decoder; |
||
| 18 | |||
| 19 | 5 | public function __construct( |
|
| 20 | NodeValueInterface $value, |
||
| 21 | ValueEncoderInterface $encoder, |
||
| 22 | ValueDecoderInterface $decoder |
||
| 23 | ) { |
||
| 24 | 5 | $this->value = $value; |
|
| 25 | 5 | $this->encoder = $encoder; |
|
| 26 | 5 | $this->decoder = $decoder; |
|
| 27 | 5 | } |
|
| 28 | |||
| 29 | 2 | public function encode(): string |
|
| 30 | { |
||
| 31 | return $this |
||
| 32 | 2 | ->encoder |
|
| 33 | 2 | ->exportValue($this->value); |
|
| 34 | } |
||
| 35 | |||
| 36 | 2 | public function decode() |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | public function get(): NodeValueInterface |
|
| 46 | } |
||
| 47 | } |
||
| 48 |