| Total Complexity | 5 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | trait ArrayAccessTrait |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * This method returns a reference to the variable to allow for indirect |
||
| 14 | * array modification (e.g., $foo['bar']['baz'] = 'qux'). |
||
| 15 | * |
||
| 16 | * @param string $offset |
||
| 17 | * |
||
| 18 | * @return mixed|null |
||
| 19 | */ |
||
| 20 | 1 | public function & offsetGet($offset) |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $offset |
||
| 33 | * @param string|mixed $value |
||
| 34 | */ |
||
| 35 | 1 | public function offsetSet($offset, $value) |
|
| 36 | { |
||
| 37 | 1 | $this->data[$offset] = $value; |
|
|
|
|||
| 38 | 1 | } |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $offset |
||
| 42 | * |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | 1 | public function offsetExists($offset) |
|
| 46 | { |
||
| 47 | 1 | return isset($this->data[$offset]); |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param string $offset |
||
| 52 | */ |
||
| 53 | 1 | public function offsetUnset($offset) |
|
| 56 | 1 | } |
|
| 57 | } |
||
| 58 |