Merge pull request #9536 from bshaffer/patch-2

chore: [PHP] fix phpdoc for MapField keys
This commit is contained in:
Joshua Haberman 2022-05-06 10:21:35 -07:00 committed by GitHub
commit d8b0884442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
* *
* This will also be called for: $ele = $arr[$key] * This will also be called for: $ele = $arr[$key]
* *
* @param int|bool|string $key The key of the element to be fetched. * @param int|string $key The key of the element to be fetched.
* @return object The stored element at given key. * @return object The stored element at given key.
* @throws \ErrorException Invalid type for index. * @throws \ErrorException Invalid type for index.
* @throws \ErrorException Non-existing index. * @throws \ErrorException Non-existing index.
@ -148,7 +148,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
* *
* This will also be called for: $arr[$key] = $value * This will also be called for: $arr[$key] = $value
* *
* @param object $key The key of the element to be fetched. * @param int|string $key The key of the element to be fetched.
* @param object $value The element to be assigned. * @param object $value The element to be assigned.
* @return void * @return void
* @throws \ErrorException Invalid type for key. * @throws \ErrorException Invalid type for key.
@ -211,7 +211,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
* *
* This will also be called for: unset($arr) * This will also be called for: unset($arr)
* *
* @param object $key The key of the element to be removed. * @param int|string $key The key of the element to be removed.
* @return void * @return void
* @throws \ErrorException Invalid type for key. * @throws \ErrorException Invalid type for key.
* @todo need to add return type void (require update php version to 7.1) * @todo need to add return type void (require update php version to 7.1)
@ -228,7 +228,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
* *
* This will also be called for: isset($arr) * This will also be called for: isset($arr)
* *
* @param object $key The key of the element to be removed. * @param int|string $key The key of the element to be removed.
* @return bool True if the element at the given key exists. * @return bool True if the element at the given key exists.
* @throws \ErrorException Invalid type for key. * @throws \ErrorException Invalid type for key.
*/ */