-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
covert this container property fetch as well
- Loading branch information
1 parent
0002694
commit 990bceb
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
.../ControllerGetByTypeToConstructorInjectionRector/Fixture/cover_container_property.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,36 @@ | ||
<?php | ||
|
||
namespace Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Fixture; | ||
|
||
use Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Source\SomeService; | ||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
|
||
final class CoverContainerProperty extends Controller | ||
{ | ||
public function configure() | ||
{ | ||
$someType = $this->container->get(SomeService::class); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Fixture; | ||
|
||
use Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Source\SomeService; | ||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
|
||
final class CoverContainerProperty extends Controller | ||
{ | ||
public function __construct(private \Rector\Symfony\Tests\DependencyInjection\Rector\Class_\ControllerGetByTypeToConstructorInjectionRector\Source\SomeService $someService) | ||
{ | ||
} | ||
public function configure() | ||
{ | ||
$someType = $this->someService; | ||
} | ||
} | ||
|
||
?> |
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