Code Duplication    Length = 8-9 lines in 2 locations

src/Controller/Dispatcher.php 2 locations

@@ 212-219 (lines=8) @@
209
                    'action' => $data['action'] . 'Action'
210
                ];
211
212
            } else if ($this->requestType === 'api') {
213
214
                return [
215
                    'class'  => $data['controller'],
216
                    'action' => $this->getRestfulAction()
217
                ];
218
219
            }
220
221
            throw new MethodNotFoundException('Non valid request method available.');
222
@@ 258-266 (lines=9) @@
255
                    'var'    => $var
256
                ];
257
258
            } else if ($this->requestType === 'api') {
259
260
                return [
261
                    'class'  => $data['controller'],
262
                    'action' => $this->getRestfulAction(),
263
                    'var'    => $var
264
                ];
265
266
            }
267
268
        }
269