Update param type on offsetGet (#8033)
The param was typed as `object` which is invalid as when items are set in the container the key passes through `checkKey` where it enforces the key must be various classes of integer, bool or string. Thus I have replaced it with a union type (in future this can be a proper PHP level typehint, but for now only doctype)
This commit is contained in:
parent
9432c99f37
commit
9ee163a5d7
@ -129,7 +129,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
|
||||
*
|
||||
* This will also be called for: $ele = $arr[$key]
|
||||
*
|
||||
* @param object $key The key of the element to be fetched.
|
||||
* @param int|bool|string $key The key of the element to be fetched.
|
||||
* @return object The stored element at given key.
|
||||
* @throws \ErrorException Invalid type for index.
|
||||
* @throws \ErrorException Non-existing index.
|
||||
|
Loading…
Reference in New Issue
Block a user