Total Complexity | 5 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | final class ExistingValueResult implements ValueResultInterface |
||
11 | { |
||
12 | |||
13 | private $jsonEncoder; |
||
14 | |||
15 | private $jsonDecoder; |
||
16 | |||
17 | private $value; |
||
18 | |||
19 | 6 | public function __construct( |
|
20 | ValueEncoderInterface $jsonEncoder, |
||
21 | ValueDecoderInterface $jsonDecoder, |
||
22 | ValueInterface $value |
||
23 | ) { |
||
24 | 6 | $this->jsonEncoder = $jsonEncoder; |
|
25 | 6 | $this->jsonDecoder = $jsonDecoder; |
|
26 | 6 | $this->value = $value; |
|
27 | 6 | } |
|
28 | |||
29 | 1 | public function exists(): bool |
|
30 | { |
||
31 | 1 | return true; |
|
32 | } |
||
33 | |||
34 | 2 | public function encode(): string |
|
39 | } |
||
40 | |||
41 | 2 | public function decode() |
|
46 | } |
||
47 | |||
48 | 1 | public function get(): ValueInterface |
|
53 |