public function enterNode(Node $node): ?int
    {
        switch (get_class($node)) {
            case Namespace_::class:
                $this->resetState('\\' . $node->name . '\\');
                $node->fqsen = new Fqsen($this->buildName());
                break;
            case Class_::class:
            case Trait_::class:
            case Interface_::class:
                if (empty($node->name)) {
                    return NodeTraverser::DONT_TRAVERSE_CHILDREN;
                }

                $this->parts->push((string)$node->name);
                $node->fqsen = new Fqsen($this->buildName());
                break;
            case Function_::class:
                $this->parts->push($node->name . '()');
                $node->fqsen = new Fqsen($this->buildName());
                return NodeTraverser::DONT_TRAVERSE_CHILDREN;
            case ClassMethod::class:
                $this->parts->push('::' . $node->name . '()');
                $node->fqsen = new Fqsen($this->buildName());
                return NodeTraverser::DONT_TRAVERSE_CHILDREN;
            case ClassConst::class:
                $this->parts->push('::');
                break;
            case Const_::class:
                $this->parts->push($node->name);
                $node->fqsen = new Fqsen($this->buildName());
                break;
            case PropertyProperty::class:
                $this->parts->push('::$' . $node->name);
                $node->fqsen = new Fqsen($this->buildName());
                break;
        }

        return null;
    }