rector/rules/Transform/ValueObject/VariableMethodCallToServiceCall.php
Tomas Votruba cdc3b7adef Updated Rector to commit f451b0b8e1e6761ec7f50809745d44d01caba66d
f451b0b8e1 [PHP 8.0] Bump to promoted properties (#4)
2021-05-10 23:39:21 +00:00

61 lines
1.4 KiB
PHP

<?php
declare (strict_types=1);
namespace Rector\Transform\ValueObject;
use PHPStan\Type\ObjectType;
final class VariableMethodCallToServiceCall
{
/**
* @var string
*/
private $variableType;
/**
* @var string
*/
private $methodName;
private $argumentValue;
/**
* @var string
*/
private $serviceType;
/**
* @var string
*/
private $serviceMethodName;
/**
* @param mixed $argumentValue
*/
public function __construct(string $variableType, string $methodName, $argumentValue, string $serviceType, string $serviceMethodName)
{
$this->variableType = $variableType;
$this->methodName = $methodName;
$this->argumentValue = $argumentValue;
$this->serviceType = $serviceType;
$this->serviceMethodName = $serviceMethodName;
}
public function getVariableObjectType() : \PHPStan\Type\ObjectType
{
return new \PHPStan\Type\ObjectType($this->variableType);
}
public function getMethodName() : string
{
return $this->methodName;
}
/**
* @return mixed
*/
public function getArgumentValue()
{
return $this->argumentValue;
}
public function getServiceType() : string
{
return $this->serviceType;
}
public function getServiceMethodName() : string
{
return $this->serviceMethodName;
}
}