mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-07 11:50:51 +00:00
0c54ea5aa9
4680c56d00
Bump Rector package deps (#1087)
39 lines
809 B
PHP
39 lines
809 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\CodingStyle\ValueObject;
|
|
|
|
use PhpParser\Node;
|
|
use PhpParser\Node\Identifier;
|
|
use PhpParser\Node\Name;
|
|
final class NameAndParent
|
|
{
|
|
/**
|
|
* @var Name|Identifier
|
|
*/
|
|
private $nameNode;
|
|
/**
|
|
* @var \PhpParser\Node
|
|
*/
|
|
private $parentNode;
|
|
/**
|
|
* @param Name|Identifier $nameNode
|
|
*/
|
|
public function __construct(\PhpParser\Node $nameNode, \PhpParser\Node $parentNode)
|
|
{
|
|
$this->nameNode = $nameNode;
|
|
$this->parentNode = $parentNode;
|
|
}
|
|
/**
|
|
* @return \PhpParser\Node\Identifier|\PhpParser\Node\Name
|
|
*/
|
|
public function getNameNode()
|
|
{
|
|
return $this->nameNode;
|
|
}
|
|
public function getParentNode() : \PhpParser\Node
|
|
{
|
|
return $this->parentNode;
|
|
}
|
|
}
|