public function __construct(\PHPParser_Node $rootNode, Scope $parent = null, PhpType $thisType = null) { $this->rootNode = $rootNode; $this->parent = $parent; $this->thisType = $thisType; $this->depth = null === $parent ? 0 : $parent->getDepth() + 1; }