Total Complexity | 6 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | final class Adapter implements RegistryInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var AnotherRegistryInterface |
||
20 | */ |
||
21 | private $registry; |
||
22 | |||
23 | /** |
||
24 | * RegistryAdapter constructor. |
||
25 | * @param AnotherRegistryInterface $registry |
||
26 | */ |
||
27 | public function __construct(AnotherRegistryInterface $registry) |
||
28 | { |
||
29 | $this->registry = $registry; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param string $value |
||
34 | */ |
||
35 | public function setFirst(string $value) |
||
36 | { |
||
37 | $this->getRegistry()->setData($value); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param string $value |
||
42 | */ |
||
43 | public function setSecond(string $value) |
||
44 | { |
||
45 | $this->getRegistry()->setData($value); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getFirst(): string |
||
52 | { |
||
53 | return (string) $this->getRegistry()->getData()[0]; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getSecond(): string |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @return AnotherRegistryInterface |
||
66 | */ |
||
67 | public function getRegistry(): AnotherRegistryInterface |
||
70 | } |
||
71 | } |
||
72 |