public function makePath(Node\File $node, ?string $dir = null, string $ext = '.php'): array {
        if (is_null($node->class)) {
            throw new UnexpectedValueException('File without class cannot be saved');
        }

        $dir = $dir ?? $this->baseDir;

        $path = str_replace('\\', '/', $node->namespace);
        if (!empty($path)) {
            $dir .= '/'.$path;
        }

        return [$dir, $this->makeClassName($node->class).$ext];
    }