This commit is contained in:
TomasVotruba 2018-03-03 14:41:36 +01:00
parent 9b3630ef5e
commit 9444a21084

View File

@ -28,14 +28,6 @@ use Rector\Rector\AbstractRector;
*/
final class GetParameterToConstructorInjectionRector extends AbstractRector
{
/**
* @var string[]
*/
private $getParameterAwareTypes = [
'Symfony\Bundle\FrameworkBundle\Controller\Controller',
'Symfony\Component\DependencyInjection\ContainerAwareInterface',
];
/**
* @var PropertyNaming
*/
@ -74,7 +66,11 @@ final class GetParameterToConstructorInjectionRector extends AbstractRector
return false;
}
return $this->methodCallAnalyzer->isTypesAndMethods($node, $this->getParameterAwareTypes, ['getParameter']);
return $this->methodCallAnalyzer->isTypeAndMethod(
$node,
'Symfony\Bundle\FrameworkBundle\Controller\Controller',
'getParameter'
);
}
/**