mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-21 16:02:23 +02:00
Merge pull request #1799 from snapshotpl/iterable-function
Falling test: Iterable return type in function when yield used
This commit is contained in:
commit
8b6eb0981c
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\TypeDeclaration\Tests\Rector\FunctionLike\ReturnTypeDeclarationRector\Fixture\IterableFunction;
|
||||
|
||||
function iterableFunction($value)
|
||||
{
|
||||
yield 1;
|
||||
yield 2;
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\TypeDeclaration\Tests\Rector\FunctionLike\ReturnTypeDeclarationRector\Fixture\IterableFunction;
|
||||
|
||||
function iterableFunction($value): iterable
|
||||
{
|
||||
yield 1;
|
||||
yield 2;
|
||||
}
|
||||
|
||||
?>
|
@ -26,6 +26,7 @@ final class ReturnTypeDeclarationRectorTest extends AbstractRectorTestCase
|
||||
__DIR__ . '/Fixture/this.php.inc',
|
||||
__DIR__ . '/Fixture/false.php.inc',
|
||||
__DIR__ . '/Fixture/complex_array.php.inc',
|
||||
__DIR__ . '/Fixture/generator.php.inc',
|
||||
// php cs fixer return set - https://github.com/Slamdunk/PHP-CS-Fixer/blob/d7a409c10d0e21bc847efb26552aa65bb3c61547/tests/Fixer/FunctionNotation/PhpdocToReturnTypeFixerTest.php
|
||||
__DIR__ . '/Fixture/php-cs-fixer-return/invalid_class.php.inc',
|
||||
__DIR__ . '/Fixture/php-cs-fixer-return/invalid_return.php.inc',
|
||||
|
Loading…
x
Reference in New Issue
Block a user