Code Duplication    Length = 15-16 lines in 3 locations

Src/Router/Adaptor/FastRouteAdaptor.php 1 location

@@ 200-214 (lines=15) @@
197
     * @param $dispatchResponse
198
     * @return RouterResponse
199
     */
200
    protected function _createRouterResponse($dispatchResponse)
201
    {
202
        if ($dispatchResponse['handler']['type'] === 'object') {
203
            $dispatchResponse['content'] = $this->serializer->unserialize($dispatchResponse['handler']['content']);
204
        } else {
205
            $dispatchResponse['content'] = $dispatchResponse['handler']['content'];
206
        }
207
208
        return new RouterResponse(
209
            $dispatchResponse['statusCode'],
210
            $dispatchResponse['content'],
211
            $dispatchResponse['handler']['name'],
212
            $dispatchResponse['vars']
213
        );
214
    }
215
216
    /**
217
     * @inheritdoc

Src/Router/Adaptor/RSymfonyAdaptor.php 1 location

@@ 131-146 (lines=16) @@
128
     * @param  $dispatchResponse
129
     * @return RouterResponse
130
     */
131
    public function createRouterResponse($dispatchResponse)
132
    {
133
        if ($dispatchResponse['handler']['type'] === 'object') {
134
            $dispatchResponse['content'] = $this->serializer->unserialize($dispatchResponse['handler']['content']);
135
        } else {
136
            $dispatchResponse['content'] = $dispatchResponse['handler']['content'];
137
        }
138
139
        return new RouterResponse(
140
            $dispatchResponse['statusCode'],
141
            $dispatchResponse['allowedMethods'],
142
            $dispatchResponse['content'],
143
            $dispatchResponse['vars'],
144
            $dispatchResponse['handler']['name']
145
        );
146
    }
147
148
    public function createFastRouteHandler(RouteInterface $route)
149
    {

Src/Router/Adaptor/SymfonyAdaptor.php 1 location

@@ 117-132 (lines=16) @@
114
     * @param  $dispatchResponse
115
     * @return RouterResponse
116
     */
117
    public function createRouterResponse($dispatchResponse)
118
    {
119
        if ($dispatchResponse['handler']['type'] === 'object') {
120
            $dispatchResponse['content'] = $this->serializer->unserialize($dispatchResponse['handler']['content']);
121
        } else {
122
            $dispatchResponse['content'] = $dispatchResponse['handler']['content'];
123
        }
124
125
        return new RouterResponse(
126
            $dispatchResponse['statusCode'],
127
            $dispatchResponse['allowedMethods'],
128
            $dispatchResponse['content'],
129
            $dispatchResponse['vars'],
130
            $dispatchResponse['handler']['name']
131
        );
132
    }
133
134
    public function createFastRouteHandler(RouteInterface $route)
135
    {