fix GetRequestRector fully qualified namespace [closes #608]

This commit is contained in:
Tomas Votruba 2018-09-11 20:09:50 +02:00
parent 350658a8c9
commit 4c04f51ee5
3 changed files with 6 additions and 2 deletions

View File

@ -1,10 +1,12 @@
<?php declare (strict_types=1); <?php declare (strict_types=1);
namespace Rector\Symfony\Tests\Rector\HttpKernel\GetRequestRector\Wrong;
use Rector\Symfony\Tests\Rector\Source\SymfonyController; use Rector\Symfony\Tests\Rector\Source\SymfonyController;
class ClassWithNamedService extends SymfonyController class ClassWithNamedService extends SymfonyController
{ {
public function someAction(Symfony\Component\HttpFoundation\Request $request) public function someAction(\Symfony\Component\HttpFoundation\Request $request)
{ {
$request->getSomething(); $request->getSomething();
} }

View File

@ -1,5 +1,7 @@
<?php declare (strict_types=1); <?php declare (strict_types=1);
namespace Rector\Symfony\Tests\Rector\HttpKernel\GetRequestRector\Wrong;
use Rector\Symfony\Tests\Rector\Source\SymfonyController; use Rector\Symfony\Tests\Rector\Source\SymfonyController;
class ClassWithNamedService extends SymfonyController class ClassWithNamedService extends SymfonyController

View File

@ -177,7 +177,7 @@ final class NodeFactory
public function createParam(string $name, string $type): Param public function createParam(string $name, string $type): Param
{ {
return $this->builderFactory->param($name) return $this->builderFactory->param($name)
->setTypeHint($type) ->setTypeHint(new FullyQualified($type))
->getNode(); ->getNode();
} }