private static function getDescriptionConfiguration(array $annotations, bool $withDeprecation = false)
    {
        $config = [];
        $descriptionAnnotation = self::getFirstAnnotationMatching($annotations, 'Overblog\GraphQLBundle\Annotation\Description');
        if ($descriptionAnnotation) {
            $config['description'] = $descriptionAnnotation->value;
        }

        if ($withDeprecation) {
            $deprecatedAnnotation = self::getFirstAnnotationMatching($annotations, 'Overblog\GraphQLBundle\Annotation\Deprecated');
            if ($deprecatedAnnotation) {
                $config['deprecationReason'] = $deprecatedAnnotation->value;
            }
        }

        return $config;
    }
private static function getDescriptionConfiguration(array $annotations, bool $withDeprecation = false)
    {
        $config = [];
        $descriptionAnnotation = self::getFirstAnnotationMatching($annotations, 'Overblog\GraphQLBundle\Annotation\Description');
        if ($descriptionAnnotation) {
            $config['description'] = $descriptionAnnotation->value;
        }

        if ($withDeprecation) {
            $deprecatedAnnotation = self::getFirstAnnotationMatching($annotations, 'Overblog\GraphQLBundle\Annotation\Deprecated');
            if ($deprecatedAnnotation) {
                $config['deprecationReason'] = $deprecatedAnnotation->value;
            }
        }

        return $config;
    }
private static function getDescriptionConfiguration ( array $ annotations , bool $ withDeprecation = false ) { $ config = [ ] ; $ descriptionAnnotation = self :: getFirstAnnotationMatching ( $ annotations , 'Overblog\GraphQLBundle\Annotation\Description' ) ; if ( $ descriptionAnnotation ) { $ config [ 'description' ] = $ descriptionAnnotation -> value ; } if ( $ withDeprecation ) { $ deprecatedAnnotation = self :: getFirstAnnotationMatching ( $ annotations , 'Overblog\GraphQLBundle\Annotation\Deprecated' ) ; if ( $ deprecatedAnnotation ) { $ config [ 'deprecationReason' ] = $ deprecatedAnnotation -> value ; } } return $ config ; }
Get the config for description & deprecation reason.

@param array $annotations
@param bool  $withDeprecation

@return array
Get the config for description & deprecation reason .