Code Duplication    Length = 8-9 lines in 2 locations

src/Controller/Dispatcher.php 2 locations

@@ 208-215 (lines=8) @@
205
                    'action' => $data['action'] . 'Action'
206
                ];
207
208
            } else if ($this->requestType === 'api') {
209
210
                return [
211
                    'class'  => $data['controller'],
212
                    'action' => $this->getRestfulAction()
213
                ];
214
215
            }
216
217
            throw new MethodNotFoundException('Non valid request method available.');
218
@@ 254-262 (lines=9) @@
251
                    'var'    => $var
252
                ];
253
254
            } else if ($this->requestType === 'api') {
255
256
                return [
257
                    'class'  => $data['controller'],
258
                    'action' => $this->getRestfulAction(),
259
                    'var'    => $var
260
                ];
261
262
            }
263
264
        }
265