Skip to content

Commit

Permalink
Add explicit Iterator/IteratorAggregate
Browse files Browse the repository at this point in the history
For generated repositories, because static analyzers otherwise
had problems figuring out the generated classes.
  • Loading branch information
iquito committed Dec 15, 2021
1 parent aca61aa commit 6fd3d29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Generate/RepositoriesGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RepositoriesGenerateCommand
/**
* @implements \Iterator<int,\{namespaceOfEntity}\{classOfEntity}>
*/
class SelectIterator extends \Squirrel\Entities\Builder\SelectIterator
class SelectIterator extends \Squirrel\Entities\Builder\SelectIterator implements \Iterator
{
public function current(): \{namespaceOfEntity}\{classOfEntity}
{
Expand All @@ -51,7 +51,7 @@ public function current(): \{namespaceOfEntity}\{classOfEntity}
*
* @implements \IteratorAggregate<int,\{namespaceOfEntity}\{classOfEntity}>
*/
class SelectEntries extends \Squirrel\Entities\Builder\SelectEntries
class SelectEntries extends \Squirrel\Entities\Builder\SelectEntries implements \IteratorAggregate
{
/**
* @return \{namespaceOfEntity}\{classOfEntity}[]
Expand Down Expand Up @@ -122,7 +122,7 @@ public function select(): \{namespaceOfBuilders}\SelectEntries
,
'Writeable' => <<<'EOD'
<?php
// phpcs:ignoreFile -- created by SquirrelPHP library, do not alter
// phpcs:ignoreFile -- created by SquirrelPHP entities library, do not alter
/*
* THIS FILE IS AUTOMATICALLY CREATED - DO NOT EDIT, DO NOT COMMIT TO VCS
*
Expand Down

0 comments on commit 6fd3d29

Please sign in to comment.