Code Duplication    Length = 8-9 lines in 2 locations

src/Controller/Dispatcher.php 2 locations

@@ 265-272 (lines=8) @@
262
                    'action' => $data['action'] . 'Action'
263
                ];
264
265
            } else if ($this->requestType === 'api') {
266
267
                return [
268
                    'class'  => $data['controller'],
269
                    'action' => $this->getRestfulAction()
270
                ];
271
272
            }
273
274
            throw new MethodNotFoundException('Non valid request method available.');
275
@@ 311-319 (lines=9) @@
308
                    'var'    => $var
309
                ];
310
311
            } else if ($this->requestType === 'api') {
312
313
                return [
314
                    'class'  => $data['controller'],
315
                    'action' => $this->getRestfulAction(),
316
                    'var'    => $var
317
                ];
318
319
            }
320
321
        }
322