private static function getFirstAnnotationMatching(array $annotations, $annotationClass)
    {
        if (\is_string($annotationClass)) {
            $annotationClass = [$annotationClass];
        }

        foreach ($annotations as $annotation) {
            foreach ($annotationClass as $class) {
                if ($annotation instanceof $class) {
                    return $annotation;
                }
            }
        }

        return false;
    }
private static function getFirstAnnotationMatching(array $annotations, $annotationClass)
    {
        if (\is_string($annotationClass)) {
            $annotationClass = [$annotationClass];
        }

        foreach ($annotations as $annotation) {
            foreach ($annotationClass as $class) {
                if ($annotation instanceof $class) {
                    return $annotation;
                }
            }
        }

        return false;
    }
private static function getFirstAnnotationMatching ( array $ annotations , $ annotationClass ) { if ( \ is_string ( $ annotationClass ) ) { $ annotationClass = [ $ annotationClass ] ; } foreach ( $ annotations as $ annotation ) { foreach ( $ annotationClass as $ class ) { if ( $ annotation instanceof $ class ) { return $ annotation ; } } } return false ; }
Get the first annotation matching given class.

@param array        $annotations
@param string|array $annotationClass

@return mixed
Get the first annotation matching given class .