mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-28 21:53:31 +00:00
33 lines
674 B
PHP
33 lines
674 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\TypeDeclaration\ValueObject;
|
|
|
|
use PhpParser\Node\Expr;
|
|
final class AssignToVariable
|
|
{
|
|
/**
|
|
* @readonly
|
|
* @var string
|
|
*/
|
|
private $variableName;
|
|
/**
|
|
* @readonly
|
|
* @var \PhpParser\Node\Expr
|
|
*/
|
|
private $assignedExpr;
|
|
public function __construct(string $variableName, Expr $assignedExpr)
|
|
{
|
|
$this->variableName = $variableName;
|
|
$this->assignedExpr = $assignedExpr;
|
|
}
|
|
public function getVariableName() : string
|
|
{
|
|
return $this->variableName;
|
|
}
|
|
public function getAssignedExpr() : Expr
|
|
{
|
|
return $this->assignedExpr;
|
|
}
|
|
}
|