Skip to content

Commit

Permalink
Use Psalm annotation for ResultInterface::getIterator
Browse files Browse the repository at this point in the history
Adds Psalm's prefix for the return annotation to avoid lint errors.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Sep 20, 2022
1 parent cccbf28 commit d0b71b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libraries/classes/Dbal/MysqliResult.php
Expand Up @@ -44,7 +44,7 @@ public function __construct($result)
* Returns a generator that traverses through the whole result set
* and returns each row as an associative array
*
* @return Generator<int, array<string, string|null>, mixed, void>
* @psalm-return Generator<int, array<string, string|null>, mixed, void>
*/
public function getIterator(): Generator
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Dbal/ResultInterface.php
Expand Up @@ -22,7 +22,7 @@ interface ResultInterface extends IteratorAggregate
* Returns a generator that traverses through the whole result set
* and returns each row as an associative array
*
* @return Generator<int, array<string, string|null>, mixed, void>
* @psalm-return Generator<int, array<string, string|null>, mixed, void>
*/
public function getIterator(): Generator;

Expand Down
2 changes: 1 addition & 1 deletion test/classes/Stubs/DummyResult.php
Expand Up @@ -46,7 +46,7 @@ public function __construct(DbiDummy $link, $result)
* Returns a generator that traverses through the whole result set
* and returns each row as an associative array
*
* @return Generator<int, array<string, string|null>, mixed, void>
* @psalm-return Generator<int, array<string, string|null>, mixed, void>
*/
public function getIterator(): Generator
{
Expand Down

0 comments on commit d0b71b7

Please sign in to comment.