Total Complexity | 4 |
Total Lines | 90 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
18 | trait PropertyAccessTrait |
||
19 | { |
||
20 | /** |
||
21 | * Express Requirements by Abstract Methods. |
||
22 | * |
||
23 | * @param string $key |
||
24 | */ |
||
25 | abstract public function has($key); |
||
26 | |||
27 | /** |
||
28 | * Express Requirements by Abstract Methods. |
||
29 | * |
||
30 | * @param string $key |
||
31 | */ |
||
32 | abstract public function get($key); |
||
33 | |||
34 | /** |
||
35 | * Express Requirements by Abstract Methods. |
||
36 | * |
||
37 | * @param string $key |
||
38 | * @param mixed $value |
||
39 | * |
||
40 | * @return void |
||
41 | */ |
||
42 | abstract public function set($key, $value); |
||
43 | |||
44 | /** |
||
45 | * Express Requirements by Abstract Methods. |
||
46 | * |
||
47 | * @param string $key |
||
48 | */ |
||
49 | abstract public function delete($key): bool; |
||
50 | |||
51 | /** |
||
52 | * Set |
||
53 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
54 | * |
||
55 | * @param string $key |
||
56 | * @param mixed $value |
||
57 | * |
||
58 | * @return void |
||
59 | * |
||
60 | * @ignore |
||
61 | */ |
||
62 | 18 | public function __set(string $key, $value) |
|
63 | { |
||
64 | 18 | $this->set($key, $value); |
|
65 | 18 | } |
|
66 | |||
67 | /** |
||
68 | * Get |
||
69 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
70 | * |
||
71 | * @param string $key |
||
72 | * |
||
73 | * @return object|bool Element stored in container or false |
||
74 | * |
||
75 | * @ignore |
||
76 | */ |
||
77 | 12 | public function __get(string $key) |
|
80 | } |
||
81 | |||
82 | /** |
||
83 | * Remove |
||
84 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
85 | * |
||
86 | * @param string $key |
||
87 | * |
||
88 | * @ignore |
||
89 | */ |
||
90 | 6 | public function __unset(string $key) |
|
93 | 6 | } |
|
94 | |||
95 | /** |
||
96 | * Check |
||
97 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
98 | * |
||
99 | * @param string $key |
||
100 | * |
||
101 | * @return bool |
||
102 | * |
||
103 | * @ignore |
||
104 | */ |
||
105 | 12 | public function __isset(string $key): bool |
|
110 |