-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeQuality] Skip possible data provider method called and used as a…
…rray on YieldDataProviderRector (#404) * [CodeQuality] Skip possible data provider method called and used as array on YieldDataProviderRector * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <[email protected]>
- Loading branch information
1 parent
38bdce4
commit 687747d
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...ests/CodeQuality/Rector/Class_/YieldDataProviderRector/Fixture/skip_used_as_array.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,25 @@ | ||
<?php | ||
|
||
namespace Rector\PHPUnit\Tests\CodeQuality\Rector\Class_\YieldDataProviderRector\Fixture; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
final class SkipUsedAsArray extends TestCase | ||
{ | ||
#[\PHPUnit\Framework\Attributes\DataProvider('provideDataForProvider')] | ||
public function test(string $filePath): void | ||
{ | ||
} | ||
|
||
public static function provideDataForProvider() | ||
{ | ||
return [ | ||
['<?php implode("", $foo, );', '<?php implode($foo, "", );'] | ||
]; | ||
} | ||
|
||
public function testOther() | ||
{ | ||
$firstData = self::provideDataForProvider()[0]; | ||
} | ||
} |
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