Skip to content

Commit

Permalink
Merge pull request #359 from LVoogd/fix/explicit-return-types
Browse files Browse the repository at this point in the history
Add explicit types on `AbstractLazyCollection`
  • Loading branch information
greg0ire committed Dec 27, 2022
2 parents 425857d + e9ba2f9 commit db8cda5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/AbstractLazyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ abstract class AbstractLazyCollection implements Collection

/**
* {@inheritDoc}
*
* @return int
*/
#[ReturnTypeWillChange]
public function count()
Expand Down Expand Up @@ -329,6 +331,8 @@ public function getIterator()
* {@inheritDoc}
*
* @param TKey $offset
*
* @return bool
*/
#[ReturnTypeWillChange]
public function offsetExists(mixed $offset)
Expand All @@ -342,6 +346,8 @@ public function offsetExists(mixed $offset)
* {@inheritDoc}
*
* @param TKey $offset
*
* @return T|null
*/
#[ReturnTypeWillChange]
public function offsetGet(mixed $offset)
Expand All @@ -356,6 +362,8 @@ public function offsetGet(mixed $offset)
*
* @param TKey|null $offset
* @param T $value
*
* @return void
*/
#[ReturnTypeWillChange]
public function offsetSet(mixed $offset, mixed $value)
Expand All @@ -364,7 +372,11 @@ public function offsetSet(mixed $offset, mixed $value)
$this->collection->offsetSet($offset, $value);
}

/** @param TKey $offset */
/**
* @param TKey $offset
*
* @return void
*/
#[ReturnTypeWillChange]
public function offsetUnset(mixed $offset)
{
Expand Down

0 comments on commit db8cda5

Please sign in to comment.