| Total Complexity | 5 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class AttributeListShortcut implements ArrayAccess |
||
| 13 | { |
||
| 14 | private $attributeList; |
||
| 15 | |||
| 16 | public function __construct(AttributeListInterface $attributeList) |
||
| 17 | { |
||
| 18 | $this->attributeList = $attributeList; |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param mixed $offset |
||
| 23 | * @return mixed |
||
| 24 | */ |
||
| 25 | #[ReturnTypeWillChange] |
||
| 26 | public function offsetGet($offset) |
||
| 27 | { |
||
| 28 | return $this |
||
| 29 | ->attributeList |
||
| 30 | ->getAttribute($offset); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param mixed $offset |
||
| 35 | * @param mixed $value |
||
| 36 | */ |
||
| 37 | #[ReturnTypeWillChange] |
||
| 38 | public function offsetSet($offset, $value) |
||
| 39 | { |
||
| 40 | $this |
||
| 41 | ->attributeList |
||
| 42 | ->setAttribute($offset, $value); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param mixed $offset |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | #[ReturnTypeWillChange] |
||
| 50 | public function offsetExists($offset) |
||
| 51 | { |
||
| 52 | return $this |
||
| 53 | ->attributeList |
||
| 54 | ->attributeExists($offset); |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param mixed $offset |
||
| 59 | * @throws Exception |
||
| 60 | */ |
||
| 61 | #[ReturnTypeWillChange] |
||
| 65 | } |
||
| 66 | } |
||
| 67 |