Total Complexity | 4 |
Total Lines | 86 |
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 | abstract public function set($key, $value); |
||
41 | |||
42 | /** |
||
43 | * Express Requirements by Abstract Methods. |
||
44 | * |
||
45 | * @param string $key |
||
46 | */ |
||
47 | abstract public function delete($key): bool; |
||
48 | |||
49 | /** |
||
50 | * Set |
||
51 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
52 | * |
||
53 | * @param string $key |
||
54 | * @param mixed $value |
||
55 | * |
||
56 | * @ignore |
||
57 | */ |
||
58 | 18 | public function __set(string $key, $value) |
|
59 | { |
||
60 | 18 | $this->set($key, $value); |
|
61 | 18 | } |
|
62 | |||
63 | /** |
||
64 | * Get |
||
65 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
66 | * |
||
67 | * @param string $key |
||
68 | * |
||
69 | * @return object|bool Element stored in container or false |
||
70 | * |
||
71 | * @ignore |
||
72 | */ |
||
73 | 12 | public function __get(string $key) |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * Remove |
||
80 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
81 | * |
||
82 | * @param string $key |
||
83 | * |
||
84 | * @ignore |
||
85 | */ |
||
86 | 6 | public function __unset(string $key) |
|
89 | 6 | } |
|
90 | |||
91 | /** |
||
92 | * Check |
||
93 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
94 | * |
||
95 | * @param string $key |
||
96 | * |
||
97 | * @return bool |
||
98 | * |
||
99 | * @ignore |
||
100 | */ |
||
101 | 12 | public function __isset(string $key): bool |
|
106 |