rector/rules/Transform/ValueObject/CallableInMethodCallToVariable.php
2021-05-10 22:23:08 +00:00

40 lines
900 B
PHP

<?php
declare (strict_types=1);
namespace Rector\Transform\ValueObject;
use PHPStan\Type\ObjectType;
final class CallableInMethodCallToVariable
{
/**
* @var string
*/
private $classType;
/**
* @var string
*/
private $methodName;
/**
* @var int
*/
private $argumentPosition;
public function __construct(string $classType, string $methodName, int $argumentPosition)
{
$this->classType = $classType;
$this->methodName = $methodName;
$this->argumentPosition = $argumentPosition;
}
public function getObjectType() : \PHPStan\Type\ObjectType
{
return new \PHPStan\Type\ObjectType($this->classType);
}
public function getMethodName() : string
{
return $this->methodName;
}
public function getArgumentPosition() : int
{
return $this->argumentPosition;
}
}