Merge pull request #9536 from bshaffer/patch-2

chore: [PHP] fix phpdoc for MapField keys
pull/9930/head
Joshua Haberman 3 years ago committed by GitHub
commit d8b0884442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      php/src/Google/Protobuf/Internal/MapField.php

@ -131,7 +131,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
*
* 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.
* @throws \ErrorException Invalid type for 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
*
* @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.
* @return void
* @throws \ErrorException Invalid type for key.
@ -211,7 +211,7 @@ class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
*
* 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
* @throws \ErrorException Invalid type for key.
* @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)
*
* @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.
* @throws \ErrorException Invalid type for key.
*/

Loading…
Cancel
Save