rector/rules/Arguments/ValueObject/RemoveMethodCallParam.php
Tomas Votruba 901ae42dc7 Updated Rector to commit 282ba30ece0c31f03c5a5825c5b9520218c7db8c
282ba30ece Restore RemoveMethodCallParamRector as used (#4244)
2023-06-16 14:39:03 +00:00

46 lines
1005 B
PHP

<?php
declare (strict_types=1);
namespace Rector\Arguments\ValueObject;
use PHPStan\Type\ObjectType;
use Rector\Core\Validation\RectorAssert;
final class RemoveMethodCallParam
{
/**
* @readonly
* @var string
*/
private $class;
/**
* @readonly
* @var string
*/
private $methodName;
/**
* @readonly
* @var int
*/
private $paramPosition;
public function __construct(string $class, string $methodName, int $paramPosition)
{
$this->class = $class;
$this->methodName = $methodName;
$this->paramPosition = $paramPosition;
RectorAssert::className($class);
RectorAssert::methodName($methodName);
}
public function getObjectType() : ObjectType
{
return new ObjectType($this->class);
}
public function getMethodName() : string
{
return $this->methodName;
}
public function getParamPosition() : int
{
return $this->paramPosition;
}
}