We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb751d4 commit 4047026Copy full SHA for 4047026
rules-tests/CodeQuality/Rector/Class_/YieldDataProviderRector/Fixture/skip_yield_from_with_return.php.inc
@@ -0,0 +1,31 @@
1
+<?php
2
+
3
+namespace Rector\PHPUnit\Tests\CodeQuality\Rector\Class_\YieldDataProviderRector\Fixture;
4
5
+use PHPUnit\Framework\TestCase;
6
7
+final class UseDataProviderTest extends TestCase
8
+{
9
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
10
+ public function test(string $val1, string $val2): void
11
+ {
12
+ }
13
14
+ public static function dataProvider(): iterable
15
16
+ yield from [
17
+ ['value3', 'value4'],
18
+ ['value5', 'value6'],
19
+ ['value7', 'value8'],
20
+ ];
21
22
+ if (PHP_VERSION_ID < 80100) {
23
+ return;
24
25
26
+ return [['value1', 'value2']];
27
28
29
+}
30
31
+?>
0 commit comments