![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/rector/rector/rules/Arguments/ValueObject/ |
<?php declare (strict_types=1); namespace Rector\Arguments\ValueObject; use PHPStan\Type\ObjectType; use Rector\Arguments\Contract\ReplaceArgumentDefaultValueInterface; use Rector\Core\Validation\RectorAssert; final class ReplaceArgumentDefaultValue implements ReplaceArgumentDefaultValueInterface { /** * @readonly * @var string */ private $class; /** * @readonly * @var string */ private $method; /** * @var int<0, max> * @readonly */ private $position; /** * @readonly * @var mixed */ private $valueBefore; /** * @readonly * @var mixed */ private $valueAfter; /** * @var string */ public const ANY_VALUE_BEFORE = '*ANY_VALUE_BEFORE*'; /** * @param int<0, max> $position * @param mixed $valueBefore * @param mixed $valueAfter */ public function __construct(string $class, string $method, int $position, $valueBefore, $valueAfter) { $this->class = $class; $this->method = $method; $this->position = $position; $this->valueBefore = $valueBefore; $this->valueAfter = $valueAfter; RectorAssert::className($class); } public function getObjectType() : ObjectType { return new ObjectType($this->class); } public function getMethod() : string { return $this->method; } public function getPosition() : int { return $this->position; } /** * @return mixed */ public function getValueBefore() { return $this->valueBefore; } /** * @return mixed */ public function getValueAfter() { return $this->valueAfter; } }