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:
Mike Lehan 2020-11-30 19:29:13 +00:00 committed by GitHub
parent 9432c99f37
commit 9ee163a5d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.