-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Naming] Fix generics RenamePropertyToMatchTypeRector (#626)
- Loading branch information
1 parent
db63797
commit a6ce5e4
Showing
5 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...ing/Rector/Class_/RenamePropertyToMatchTypeRector/Fixture/skip_repository_generic.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,21 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Naming\Rector\Class_\RenamePropertyToMatchTypeRector\Fixture; | ||
|
||
use Rector\Tests\Naming\Rector\Class_\RenamePropertyToMatchTypeRector\Source\Doctrine\ObjectRepository; | ||
use Rector\Tests\Naming\Rector\Class_\RenamePropertyToMatchTypeRector\Source\Entity\SomeEntity; | ||
|
||
final class SkipRepositoryGeneric | ||
{ | ||
/** | ||
* @var ObjectRepository<SomeEntity> | ||
*/ | ||
private $timestampableRepository; | ||
|
||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
$this->timestampableRepository = $this->entityManager->getRepository(SomeEntity::class); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...Naming/Rector/Class_/RenamePropertyToMatchTypeRector/Source/Doctrine/ObjectRepository.php
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,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\Naming\Rector\Class_\RenamePropertyToMatchTypeRector\Source\Doctrine; | ||
|
||
/** | ||
* @template T | ||
*/ | ||
interface ObjectRepository | ||
{ | ||
} |
9 changes: 9 additions & 0 deletions
9
...s-tests/Naming/Rector/Class_/RenamePropertyToMatchTypeRector/Source/Entity/SomeEntity.php
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\Naming\Rector\Class_\RenamePropertyToMatchTypeRector\Source\Entity; | ||
|
||
final class SomeEntity | ||
{ | ||
} |
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
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