-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Check if property and param names match and rename if not
Fixes: #4447
- Loading branch information
1 parent
0a0209c
commit 55006b6
Showing
2 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
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
33 changes: 33 additions & 0 deletions
33
...odToConstructorInjectionRector/Fixture/inject_if_possible_different_variable_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,33 @@ | ||
<?php | ||
|
||
namespace Ssch\TYPO3Rector\Tests\Rector\CodeQuality\General\InjectMethodToConstructorInjectionRector\Fixture; | ||
|
||
use TYPO3\CMS\Core\Cache\CacheManager; | ||
|
||
class Service | ||
{ | ||
private CacheManager $cacheManagerWithDifferentVariableName; | ||
|
||
public function injectCacheManager(CacheManager $cacheManager): void | ||
{ | ||
$this->cacheManagerWithDifferentVariableName = $cacheManager; | ||
} | ||
} | ||
?> | ||
----- | ||
<?php | ||
|
||
namespace Ssch\TYPO3Rector\Tests\Rector\CodeQuality\General\InjectMethodToConstructorInjectionRector\Fixture; | ||
|
||
use TYPO3\CMS\Core\Cache\CacheManager; | ||
|
||
class Service | ||
{ | ||
private CacheManager $cacheManagerWithDifferentVariableName; | ||
|
||
public function __construct(CacheManager $cacheManagerWithDifferentVariableName) | ||
{ | ||
$this->cacheManagerWithDifferentVariableName = $cacheManagerWithDifferentVariableName; | ||
} | ||
} | ||
?> |