| Total Complexity | 5 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | trait ArrayAccessTrait{ |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | protected $array = []; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var int |
||
| 29 | */ |
||
| 30 | protected $offset = 0; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @link http://php.net/manual/arrayaccess.offsetexists.php |
||
| 34 | * @inheritdoc |
||
| 35 | */ |
||
| 36 | public function offsetExists($offset):bool{ |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @link http://php.net/manual/arrayaccess.offsetget.php |
||
| 42 | * @inheritdoc |
||
| 43 | */ |
||
| 44 | public function offsetGet($offset){ |
||
| 45 | return $this->array[$offset] ?? null; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @link http://php.net/manual/arrayaccess.offsetset.php |
||
| 50 | * @inheritdoc |
||
| 51 | */ |
||
| 52 | public function offsetSet($offset, $value){ |
||
| 59 | } |
||
| 60 | |||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @link http://php.net/manual/arrayaccess.offsetunset.php |
||
| 65 | * @inheritdoc |
||
| 66 | */ |
||
| 67 | public function offsetUnset($offset){ |
||
| 69 | } |
||
| 70 | |||
| 72 |