public function doesDocBlockContainAnnotation(string $annotation): bool
    {
        $docComment = (new \ReflectionClass($this->fullClassName))->getDocComment();

        if (false === $docComment) {
            return false;
        }

        return false !== strpos($docComment, $annotation);
    }
public function doesDocBlockContainAnnotation(string $annotation): bool
    {
        $docComment = (new \ReflectionClass($this->fullClassName))->getDocComment();

        if (false === $docComment) {
            return false;
        }

        return false !== strpos($docComment, $annotation);
    }
public function doesDocBlockContainAnnotation ( string $ annotation ) : bool { $ docComment = ( new \ ReflectionClass ( $ this -> fullClassName ) ) -> getDocComment ( ) ; if ( false === $ docComment ) { return false ; } return false !== strpos ( $ docComment , $ annotation ) ; }
An imperfect, but simple way to check for the presence of an annotation.

@param string $annotation The annotation - e.g. @UniqueEntity
An imperfect but simple way to check for the presence of an annotation .