| Conditions | 5 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 5.1158 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | 3 | public function offsetGet($offset) |
|
| 46 | { |
||
| 47 | 3 | if ($offset === 0 || $offset === 'key') { |
|
| 48 | 3 | return $this->key; |
|
| 49 | } |
||
| 50 | |||
| 51 | 3 | if ($offset === 1 || $offset === 'value') { |
|
| 52 | 3 | return $this->value; |
|
| 53 | } |
||
| 54 | |||
| 55 | throw new \InvalidArgumentException('$OFFSET must be either 0, 1, "key", or "value"'); |
||
| 56 | } |
||
| 57 | |||
| 82 |