| @@ 16-26 (lines=11) @@ | ||
| 13 | * @param mixed $offset |
|
| 14 | * @return bool |
|
| 15 | */ |
|
| 16 | public function offsetExists($offset) |
|
| 17 | { |
|
| 18 | if ($this instanceof \Traversable) { |
|
| 19 | foreach ($this as $key => $_) { |
|
| 20 | if ($key === $offset) { |
|
| 21 | return true; |
|
| 22 | } |
|
| 23 | } |
|
| 24 | } |
|
| 25 | return false; |
|
| 26 | } |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Returns the value of a key with the same type and value as $OFFSET, or returns |
|
| @@ 16-26 (lines=11) @@ | ||
| 13 | * @param mixed $offset |
|
| 14 | * @return bool |
|
| 15 | */ |
|
| 16 | public function has($offset) |
|
| 17 | { |
|
| 18 | if ($this instanceof \Traversable) { |
|
| 19 | foreach ($this as $key => $_) { |
|
| 20 | if ($key === $offset) { |
|
| 21 | return true; |
|
| 22 | } |
|
| 23 | } |
|
| 24 | } |
|
| 25 | return false; |
|
| 26 | } |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Returns the value of a key with the same type and value as $OFFSET, or returns |
|