diff --git a/src/Admin_Pages/Admin_Page_Collection.php b/src/Admin_Pages/Admin_Page_Collection.php index 55cb89f..3d9f605 100644 --- a/src/Admin_Pages/Admin_Page_Collection.php +++ b/src/Admin_Pages/Admin_Page_Collection.php @@ -54,9 +54,9 @@ public function __construct( array $admin_pages ) { * * @since n.e.x.t * - * @return Traversable Collection iterator. + * @return ArrayIterator Collection iterator. */ - public function getIterator(): Traversable /* @phpstan-ignore-line */ { + public function getIterator(): Traversable { return new ArrayIterator( $this->admin_pages ); } diff --git a/src/Privacy/Personal_Data_Eraser_Collection.php b/src/Privacy/Personal_Data_Eraser_Collection.php index 8969bc1..17f8a1c 100644 --- a/src/Privacy/Personal_Data_Eraser_Collection.php +++ b/src/Privacy/Personal_Data_Eraser_Collection.php @@ -54,9 +54,9 @@ public function __construct( array $erasers ) { * * @since n.e.x.t * - * @return Traversable Collection iterator. + * @return ArrayIterator Collection iterator. */ - public function getIterator(): Traversable /* @phpstan-ignore-line */ { + public function getIterator(): Traversable { return new ArrayIterator( $this->erasers ); } diff --git a/src/Privacy/Personal_Data_Exporter_Collection.php b/src/Privacy/Personal_Data_Exporter_Collection.php index d7da700..b39a026 100644 --- a/src/Privacy/Personal_Data_Exporter_Collection.php +++ b/src/Privacy/Personal_Data_Exporter_Collection.php @@ -54,9 +54,9 @@ public function __construct( array $exporters ) { * * @since n.e.x.t * - * @return Traversable Collection iterator. + * @return ArrayIterator Collection iterator. */ - public function getIterator(): Traversable /* @phpstan-ignore-line */ { + public function getIterator(): Traversable { return new ArrayIterator( $this->exporters ); } diff --git a/src/REST_Routes/REST_Route_Collection.php b/src/REST_Routes/REST_Route_Collection.php index ee6c269..55752fd 100644 --- a/src/REST_Routes/REST_Route_Collection.php +++ b/src/REST_Routes/REST_Route_Collection.php @@ -54,9 +54,9 @@ public function __construct( array $routes ) { * * @since n.e.x.t * - * @return Traversable Collection iterator. + * @return ArrayIterator Collection iterator. */ - public function getIterator(): Traversable /* @phpstan-ignore-line */ { + public function getIterator(): Traversable { return new ArrayIterator( $this->routes ); }