-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Naming] Fix dotted name on generics bug in RenameVariableToMatchMeth…
…odCallReturnTypeRector (#5250)
- Loading branch information
1 parent
7ec1be6
commit 5647e1b
Showing
5 changed files
with
47 additions
and
54 deletions.
There are no files selected for viewing
39 changes: 0 additions & 39 deletions
39
...ng/Rector/Assign/RenameVariableToMatchMethodCallReturnTypeRector/Fixture/clousure.php.inc
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
...ctor/Assign/RenameVariableToMatchMethodCallReturnTypeRector/Fixture/skip_dot_name.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,27 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Naming\Rector\Assign\RenameVariableToMatchMethodCallReturnTypeRector\Fixture; | ||
|
||
use Symfony\Component\DependencyInjection\Container; | ||
|
||
class SkipDotName | ||
{ | ||
public function run() | ||
{ | ||
$someType = $this->getService('some.type'); | ||
} | ||
|
||
/** | ||
* @template TService as object | ||
* | ||
* @param class-string<TService> $type | ||
* @return TService | ||
*/ | ||
public function getService(string $type): object | ||
{ | ||
/** @var Container $container */ | ||
$container = self::$container; | ||
|
||
return $container->get($type); | ||
} | ||
} |
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
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