Skip to content

Commit

Permalink
Fix return annotations for getIterator implementations.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Aug 19, 2024
1 parent 8f43e8e commit 90205e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Admin_Pages/Admin_Page_Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public function __construct( array $admin_pages ) {
*
* @since n.e.x.t
*
* @return Traversable Collection iterator.
* @return ArrayIterator<int, Admin_Page> Collection iterator.
*/
public function getIterator(): Traversable /* @phpstan-ignore-line */ {
public function getIterator(): Traversable {
return new ArrayIterator( $this->admin_pages );
}

Expand Down
4 changes: 2 additions & 2 deletions src/Privacy/Personal_Data_Eraser_Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public function __construct( array $erasers ) {
*
* @since n.e.x.t
*
* @return Traversable Collection iterator.
* @return ArrayIterator<int, Personal_Data_Eraser> Collection iterator.
*/
public function getIterator(): Traversable /* @phpstan-ignore-line */ {
public function getIterator(): Traversable {
return new ArrayIterator( $this->erasers );
}

Expand Down
4 changes: 2 additions & 2 deletions src/Privacy/Personal_Data_Exporter_Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public function __construct( array $exporters ) {
*
* @since n.e.x.t
*
* @return Traversable Collection iterator.
* @return ArrayIterator<int, Personal_Data_Exporter> Collection iterator.
*/
public function getIterator(): Traversable /* @phpstan-ignore-line */ {
public function getIterator(): Traversable {
return new ArrayIterator( $this->exporters );
}

Expand Down
4 changes: 2 additions & 2 deletions src/REST_Routes/REST_Route_Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public function __construct( array $routes ) {
*
* @since n.e.x.t
*
* @return Traversable Collection iterator.
* @return ArrayIterator<int, REST_Route> Collection iterator.
*/
public function getIterator(): Traversable /* @phpstan-ignore-line */ {
public function getIterator(): Traversable {
return new ArrayIterator( $this->routes );
}

Expand Down

0 comments on commit 90205e6

Please sign in to comment.