2020-08-26 12:54:53 +02:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2022-06-06 17:12:56 +00:00
|
|
|
namespace Rector\Removing\ValueObject;
|
2020-08-26 12:54:53 +02:00
|
|
|
|
2022-08-06 21:53:15 +00:00
|
|
|
use Rector\Core\Validation\RectorAssert;
|
2020-09-12 23:19:08 +02:00
|
|
|
final class RemoveFuncCallArg
|
2020-08-26 12:54:53 +02:00
|
|
|
{
|
|
|
|
/**
|
2021-12-04 12:47:17 +00:00
|
|
|
* @readonly
|
2020-08-26 12:54:53 +02:00
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $function;
|
|
|
|
/**
|
2021-12-04 12:47:17 +00:00
|
|
|
* @readonly
|
2020-08-26 12:54:53 +02:00
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
private $argumentPosition;
|
|
|
|
public function __construct(string $function, int $argumentPosition)
|
|
|
|
{
|
|
|
|
$this->function = $function;
|
|
|
|
$this->argumentPosition = $argumentPosition;
|
2022-08-06 21:53:15 +00:00
|
|
|
RectorAssert::functionName($function);
|
2020-08-26 12:54:53 +02:00
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getFunction() : string
|
2020-08-26 12:54:53 +02:00
|
|
|
{
|
|
|
|
return $this->function;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getArgumentPosition() : int
|
2020-08-26 12:54:53 +02:00
|
|
|
{
|
|
|
|
return $this->argumentPosition;
|
|
|
|
}
|
|
|
|
}
|