Skip to content

Commit

Permalink
Restore return type to covariant IteratorAggregate implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Dec 21, 2021
1 parent 4d164da commit 0f2b5bb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Symfony/Component/EventDispatcher/GenericEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ public function offsetExists(mixed $key): bool

/**
* IteratorAggregate for iterating over the object like an array.
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpFoundation/HeaderBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ public function removeCacheControlDirective(string $key)

/**
* Returns an iterator for headers.
*
* @return \ArrayIterator<string, list<string|null>>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpFoundation/ParameterBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ public function filter(string $key, mixed $default = null, int $filter = \FILTER

/**
* Returns an iterator for parameters.
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ public function clear(): mixed

/**
* Returns an iterator for attributes.
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpFoundation/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ public function isStarted(): bool

/**
* Returns an iterator for attributes.
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
{
Expand Down

0 comments on commit 0f2b5bb

Please sign in to comment.