Skip to content

Commit

Permalink
Merge pull request #353 from derrabus/improvement/explicit-return-types
Browse files Browse the repository at this point in the history
Add explicit types on ArrayCollection
  • Loading branch information
greg0ire authored Nov 20, 2022
2 parents 72d3f8c + e418258 commit d45f038
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/ArrayCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ public function removeElement(mixed $element)
* Required by interface ArrayAccess.
*
* @param TKey $offset
* {@inheritDoc}
*
* @return bool
*/
#[ReturnTypeWillChange]
public function offsetExists(mixed $offset)
Expand All @@ -182,7 +183,8 @@ public function offsetExists(mixed $offset)
* Required by interface ArrayAccess.
*
* @param TKey $offset
* {@inheritDoc}
*
* @return T|null
*/
#[ReturnTypeWillChange]
public function offsetGet(mixed $offset)
Expand All @@ -195,7 +197,8 @@ public function offsetGet(mixed $offset)
*
* @param TKey|null $offset
* @param T $value
* {@inheritDoc}
*
* @return void
*/
#[ReturnTypeWillChange]
public function offsetSet(mixed $offset, mixed $value)
Expand All @@ -213,7 +216,8 @@ public function offsetSet(mixed $offset, mixed $value)
* Required by interface ArrayAccess.
*
* @param TKey $offset
* {@inheritDoc}
*
* @return void
*/
#[ReturnTypeWillChange]
public function offsetUnset(mixed $offset)
Expand Down Expand Up @@ -292,9 +296,7 @@ public function getValues()
return array_values($this->elements);
}

/**
* {@inheritDoc}
*/
/** @return int */
#[ReturnTypeWillChange]
public function count()
{
Expand Down

0 comments on commit d45f038

Please sign in to comment.