src/Tools/ResponseStrategies/ResponseTagStrategy.php
protected function getDocBlockResponses(array $tags)
    {
        $responseTags = array_values(
            array_filter($tags, function ($tag) {
                return $tag instanceof Tag && strtolower($tag->getName()) === 'response';
            })
        );

        if (empty($responseTags)) {
            return;
        }

        return array_map(function (Tag $responseTag) {
            preg_match('/^(\d{3})?\s?([\s\S]*)$/', $responseTag->getContent(), $result);

            $status = $result[1] ?: 200;
            $content = $result[2] ?: '{}';

            return new JsonResponse(json_decode($content, true), (int) $status);
        }, $responseTags);
    }
protected function getDocBlockResponses(array $tags)
    {
        $responseTags = array_values(
            array_filter($tags, function ($tag) {
                return $tag instanceof Tag && strtolower($tag->getName()) === 'response';
            })
        );

        if (empty($responseTags)) {
            return;
        }

        return array_map(function (Tag $responseTag) {
            preg_match('/^(\d{3})?\s?([\s\S]*)$/', $responseTag->getContent(), $result);

            $status = $result[1] ?: 200;
            $content = $result[2] ?: '{}';

            return new JsonResponse(json_decode($content, true), (int) $status);
        }, $responseTags);
    }
protected function getDocBlockResponses ( array $ tags ) { $ responseTags = array_values ( array_filter ( $ tags , function ( $ tag ) { return $ tag instanceof Tag && strtolower ( $ tag -> getName ( ) ) === 'response' ; } ) ) ; if ( empty ( $ responseTags ) ) { return ; } return array_map ( function ( Tag $ responseTag ) { preg_match ( '/^(\d{3})?\s?([\s\S]*)$/' , $ responseTag -> getContent ( ) , $ result ) ; $ status = $ result [ 1 ] ? : 200 ; $ content = $ result [ 2 ] ? : '{}' ; return new JsonResponse ( json_decode ( $ content , true ) , ( int ) $ status ) ; } , $ responseTags ) ; }
Get the response from the docblock if available.

@param array $tags

@return array|null
Get the response from the docblock if available .