Skip to content

Commit

Permalink
fix: phpdoc for repeatedfield (protocolbuffers#9783)
Browse files Browse the repository at this point in the history
* fix-phpdoc-for-protobuf-repeatedfield

* fix: offsetSet should accept null
  • Loading branch information
bshaffer authored Apr 18, 2022
1 parent d2fd441 commit 81e5139
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions php/src/Google/Protobuf/Internal/RepeatedField.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function getLegacyClass()
* This will also be called for: $ele = $arr[0]
*
* @param integer $offset The index of the element to be fetched.
* @return object The stored element at given index.
* @return mixed The stored element at given index.
* @throws \ErrorException Invalid type for index.
* @throws \ErrorException Non-existing index.
* @todo need to add return type mixed (require update php version to 8.0)
Expand All @@ -134,8 +134,8 @@ public function offsetGet($offset)
*
* This will also be called for: $arr []= $ele and $arr[0] = ele
*
* @param integer $offset The index of the element to be assigned.
* @param object $value The element to be assigned.
* @param int|null $offset The index of the element to be assigned.
* @param mixed $value The element to be assigned.
* @return void
* @throws \ErrorException Invalid type for index.
* @throws \ErrorException Non-existing index.
Expand Down

0 comments on commit 81e5139

Please sign in to comment.