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);
    }