Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Skip iterable already there in AddReturnTypeDeclara…
…tionFromYieldsRector (#5291)
- Loading branch information
1 parent
09a962c
commit e66754a
Showing
5 changed files
with
19 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
...tor/FunctionLike/AddReturnTypeDeclarationFromYieldsRector/Fixture/return_iterator.php.inc
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
...unctionLike/AddReturnTypeDeclarationFromYieldsRector/Fixture/return_type_iterable.php.inc
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
...onLike/AddReturnTypeDeclarationFromYieldsRector/Fixture/skip_return_type_iterable.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector\Fixture; | ||
|
||
final class SkipReturnTypeIterable | ||
{ | ||
public function run(): iterable | ||
{ | ||
yield from $this->getData(); | ||
} | ||
|
||
private function getData(): array | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters