private function getDocumentType($document, $directory)
    {
        $namespace = $this->finder->getNamespace($document, $directory);
        $reflectionClass = new \ReflectionClass($namespace);
        $document = $this->getDocumentAnnotationData($reflectionClass);

        return empty($document->type) ? Caser::snake($reflectionClass->getShortName()) : $document->type;
    }