Code Duplication    Length = 8-9 lines in 2 locations

src/Controller/Dispatcher.php 2 locations

@@ 204-211 (lines=8) @@
201
                    'action' => $data['action'] . 'Action'
202
                ];
203
204
            } else if ($this->requestType === 'api') {
205
206
                return [
207
                    'class'  => $data['controller'],
208
                    'action' => $this->getRestfulAction()
209
                ];
210
211
            }
212
213
            throw new MethodNotFoundException('Non valid request method available.');
214
@@ 250-258 (lines=9) @@
247
                    'var'    => $var
248
                ];
249
250
            } else if ($this->requestType === 'api') {
251
252
                return [
253
                    'class'  => $data['controller'],
254
                    'action' => $this->getRestfulAction(),
255
                    'var'    => $var
256
                ];
257
258
            }
259
260
        }
261