| Total Complexity | 5 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 20 | trait PropertyAccessTrait |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Magic metod |
||
| 24 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
| 25 | * |
||
| 26 | * @param string $offset |
||
| 27 | * @param mixed $value |
||
| 28 | * |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | 22 | public function __set(string $offset, $value) |
|
| 34 | 22 | } |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Magic metod |
||
| 38 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
| 39 | * |
||
| 40 | * @param string $offset |
||
| 41 | * |
||
| 42 | * @return mixed |
||
| 43 | */ |
||
| 44 | 23 | public function __get(string $offset) |
|
| 45 | { |
||
| 46 | 23 | if (isset($this->data[$offset])) { |
|
| 47 | 22 | return $this->data[$offset]; |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | return false; |
|
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Magic metod |
||
| 55 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
| 56 | * |
||
| 57 | * @param string $offset |
||
| 58 | */ |
||
| 59 | 3 | public function __unset(string $offset) |
|
| 62 | 3 | } |
|
| 63 | |||
| 64 | /** |
||
| 65 | * Magic metod |
||
| 66 | * http://php.net/manual/en/language.oop5.overloading.php. |
||
| 67 | * |
||
| 68 | * @param string $offset |
||
| 69 | */ |
||
| 70 | 20 | public function __isset(string $offset) |
|
| 75 |