Skip to content

Commit

Permalink
add new ReturnToYieldFromFixer test
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangut committed Sep 26, 2023
1 parent 911650b commit 64ada60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Fixer/ArrayNotation/ReturnToYieldFromFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public static function provideFixCases(): iterable

yield ['<?php return [fn() => [1, 2, 3]];'];

yield [
'<?php
function foo(): iterable { return $z; }
return [1,2] ?> X <?php { echo 2; }',
];

yield ['<?php function foo() { return [1, 2, 3]; }'];

yield ['<?php function foo(): MyAwesomeIterableType { return [1, 2, 3]; }'];
Expand Down

0 comments on commit 64ada60

Please sign in to comment.