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;
    }
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;
    }
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 ; }
Returns document type.

@param string $document  Format must be like AcmeBundle:Document.
@param string $directory The Document directory name of the bundle.

@return string
Returns document type .