mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 19:53:14 +01:00
Merge pull request #2273 from gnutix/ReturnArrayClassMethodToYieldRector/add-test-case-issue-2187
Add a working and a failing test case for #2187
This commit is contained in:
commit
2591557263
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\ClassMethod\ReturnArrayClassMethodToYieldRector\Fixture;
|
||||
|
||||
final class ShouldNotApplyWhenClassNameDiffers
|
||||
{
|
||||
public function getSubscribedEvents(): array
|
||||
{
|
||||
return ['some' => 'event'];
|
||||
}
|
||||
|
||||
public function provideSomeData(): array
|
||||
{
|
||||
return ['some' => 'data'];
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\ClassMethod\ReturnArrayClassMethodToYieldRector\Fixture;
|
||||
|
||||
use Rector\CodingStyle\Tests\Rector\ClassMethod\ReturnArrayClassMethodToYieldRector\Source\ParentTestCase;
|
||||
|
||||
final class ShouldNotApplyWhenMethodNameDiffers extends ParentTestCase
|
||||
{
|
||||
public function getSomePublicData(): array
|
||||
{
|
||||
return ['visibility' => 'public'];
|
||||
}
|
||||
|
||||
private function getSomePrivateData(): array
|
||||
{
|
||||
return ['visibility' => 'private'];
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user