Total Complexity | 5 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | final class Adapter implements RegistryInterface |
||
13 | { |
||
14 | private AnotherRegistryInterface $registry; |
||
15 | |||
16 | /** |
||
17 | * Sets a different registry type |
||
18 | * ------------------------------ |
||
19 | * Устанавливает другой тип реестра |
||
20 | * |
||
21 | * @param AnotherRegistryInterface $registry |
||
22 | */ |
||
23 | public function __construct(AnotherRegistryInterface $registry) |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Sets the first value |
||
30 | * -------------------- |
||
31 | * Устанавливает первое значение |
||
32 | * |
||
33 | * @param string $value |
||
34 | * @return void |
||
35 | */ |
||
36 | public function setFirst(string $value) |
||
37 | { |
||
38 | $this->registry->setData($value); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Sets the second value |
||
43 | * --------------------- |
||
44 | * Устанавливает второе значение |
||
45 | * |
||
46 | * @param string $value |
||
47 | * @return void |
||
48 | */ |
||
49 | public function setSecond(string $value) |
||
50 | { |
||
51 | $this->registry->setData($value); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * Gets the first value |
||
56 | * -------------------- |
||
57 | * Получает первое значение |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getFirst(): string |
||
62 | { |
||
63 | return (string) $this->registry->getData()[0]; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Gets the second value |
||
68 | * --------------------- |
||
69 | * Получает второе значение |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getSecond(): string |
||
76 | } |
||
77 | } |
||
78 |