rector/packages/NodeCollector/ValueObject/ArrayCallableDynamicMethod.php
Tomas Votruba 3313a231b7 Updated Rector to commit bb609b28e327ca1fb7827b6bc548013d19a2cf4e
bb609b28e3 [Core] Always reset stopTraversal to false on next Rector visit (#4182)
2023-06-11 14:17:34 +00:00

45 lines
890 B
PHP

<?php
declare (strict_types=1);
namespace Rector\NodeCollector\ValueObject;
use PhpParser\Node\Expr;
use Rector\Core\Validation\RectorAssert;
/**
* @api
*/
final class ArrayCallableDynamicMethod
{
/**
* @var \PhpParser\Node\Expr
*/
private $callerExpr;
/**
* @var string
*/
private $class;
/**
* @var \PhpParser\Node\Expr
*/
private $method;
public function __construct(Expr $callerExpr, string $class, Expr $method)
{
$this->callerExpr = $callerExpr;
$this->class = $class;
$this->method = $method;
RectorAssert::className($class);
}
public function getClass() : string
{
return $this->class;
}
public function getMethod() : Expr
{
return $this->method;
}
public function getCallerExpr() : Expr
{
return $this->callerExpr;
}
}