src/Parser/ParsedObject.php
public function hasAnnotation(string $annotation, string $value = null): bool
    {
        $pattern = sprintf(
            '/@%s%s/',
            $annotation,
            null !== $value ? "[\s]+$value" : '\b'
        );

        return 1 === preg_match($pattern, $this->docBlock);
    }
public function hasAnnotation(string $annotation, string $value = null): bool
    {
        $pattern = sprintf(
            '/@%s%s/',
            $annotation,
            null !== $value ? "[\s]+$value" : '\b'
        );

        return 1 === preg_match($pattern, $this->docBlock);
    }
public function hasAnnotation ( string $ annotation , string $ value = null ) : bool { $ pattern = sprintf ( '/@%s%s/' , $ annotation , null !== $ value ? "[\s]+$value" : '\b' ) ; return 1 === preg_match ( $ pattern , $ this -> docBlock ) ; }
Returns whether or not the parsed object
has an annotation matching the name and value
if provided.

@param string $anno
@param mixed  $value

@return bool
Returns whether or not the parsed object has an annotation matching the name and value if provided .