Skip to content

Commit

Permalink
Add @return phpdoc to ReturnTypeWillChange methods (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Apr 17, 2023
1 parent c10ea7f commit af19547
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/Gd/Layers.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public function animate($format, $delay, $loops)
* {@inheritdoc}
*
* @see \Iterator::current()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function current()
Expand All @@ -117,6 +119,8 @@ public function current()
* {@inheritdoc}
*
* @see \Iterator::key()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function key()
Expand All @@ -128,6 +132,8 @@ public function key()
* {@inheritdoc}
*
* @see \Iterator::next()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function next()
Expand All @@ -139,6 +145,8 @@ public function next()
* {@inheritdoc}
*
* @see \Iterator::rewind()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
Expand All @@ -150,6 +158,8 @@ public function rewind()
* {@inheritdoc}
*
* @see \Iterator::valid()
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
Expand All @@ -161,6 +171,8 @@ public function valid()
* {@inheritdoc}
*
* @see \Countable::count()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
Expand All @@ -172,6 +184,8 @@ public function count()
* {@inheritdoc}
*
* @see \ArrayAccess::offsetExists()
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
Expand All @@ -183,6 +197,8 @@ public function offsetExists($offset)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetGet()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
Expand All @@ -198,6 +214,8 @@ public function offsetGet($offset)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetSet()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
Expand All @@ -209,6 +227,8 @@ public function offsetSet($offset, $value)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetUnset()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
Expand Down
20 changes: 20 additions & 0 deletions src/Gmagick/Layers.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ public function animate($format, $delay, $loops)
* {@inheritdoc}
*
* @see \Iterator::current()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function current()
Expand Down Expand Up @@ -176,6 +178,8 @@ private function extractAt($offset)
* {@inheritdoc}
*
* @see \Iterator::key()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function key()
Expand All @@ -187,6 +191,8 @@ public function key()
* {@inheritdoc}
*
* @see \Iterator::next()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function next()
Expand All @@ -198,6 +204,8 @@ public function next()
* {@inheritdoc}
*
* @see \Iterator::rewind()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
Expand All @@ -209,6 +217,8 @@ public function rewind()
* {@inheritdoc}
*
* @see \Iterator::valid()
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
Expand All @@ -220,6 +230,8 @@ public function valid()
* {@inheritdoc}
*
* @see \Countable::count()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
Expand All @@ -235,6 +247,8 @@ public function count()
* {@inheritdoc}
*
* @see \ArrayAccess::offsetExists()
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
Expand All @@ -246,6 +260,8 @@ public function offsetExists($offset)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetGet()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
Expand All @@ -257,6 +273,8 @@ public function offsetGet($offset)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetSet()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $image)
Expand Down Expand Up @@ -309,6 +327,8 @@ public function offsetSet($offset, $image)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetUnset()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
Expand Down
4 changes: 3 additions & 1 deletion src/Image/Histogram/Bucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public function add($value)
}

/**
* @return int the number of elements in the bucket
* Get the number of elements in the bucket.
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
Expand Down
20 changes: 20 additions & 0 deletions src/Imagick/Layers.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ public function coalesce()
* {@inheritdoc}
*
* @see \Iterator::current()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function current()
Expand Down Expand Up @@ -188,6 +190,8 @@ private function extractAt($offset)
* {@inheritdoc}
*
* @see \Iterator::key()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function key()
Expand All @@ -199,6 +203,8 @@ public function key()
* {@inheritdoc}
*
* @see \Iterator::next()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function next()
Expand All @@ -210,6 +216,8 @@ public function next()
* {@inheritdoc}
*
* @see \Iterator::rewind()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
Expand All @@ -221,6 +229,8 @@ public function rewind()
* {@inheritdoc}
*
* @see \Iterator::valid()
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
Expand All @@ -232,6 +242,8 @@ public function valid()
* {@inheritdoc}
*
* @see \Countable::count()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
Expand All @@ -247,6 +259,8 @@ public function count()
* {@inheritdoc}
*
* @see \ArrayAccess::offsetExists()
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
Expand All @@ -258,6 +272,8 @@ public function offsetExists($offset)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetGet()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
Expand All @@ -269,6 +285,8 @@ public function offsetGet($offset)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetSet()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $image)
Expand Down Expand Up @@ -312,6 +330,8 @@ public function offsetSet($offset, $image)
* {@inheritdoc}
*
* @see \ArrayAccess::offsetUnset()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
Expand Down

0 comments on commit af19547

Please sign in to comment.