rector/rules/Transform/ValueObject/NewArgToMethodCall.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

43 lines
835 B
PHP

<?php
declare (strict_types=1);
namespace Rector\Transform\ValueObject;
use PHPStan\Type\ObjectType;
final class NewArgToMethodCall
{
/**
* @var string
*/
private $type;
private $value;
/**
* @var string
*/
private $methodCall;
/**
* @param mixed $value
*/
public function __construct(string $type, $value, string $methodCall)
{
$this->type = $type;
$this->value = $value;
$this->methodCall = $methodCall;
}
public function getObjectType() : \PHPStan\Type\ObjectType
{
return new \PHPStan\Type\ObjectType($this->type);
}
/**
* @return mixed
*/
public function getValue()
{
return $this->value;
}
public function getMethodCall() : string
{
return $this->methodCall;
}
}