Code Duplication    Length = 8-9 lines in 2 locations

src/Controller/Dispatcher.php 2 locations

@@ 222-229 (lines=8) @@
219
                    'action' => $data['action'] . 'Action'
220
                ];
221
222
            } else if ($this->requestType === 'api') {
223
224
                return [
225
                    'class'  => $data['controller'],
226
                    'action' => $this->getRestfulAction()
227
                ];
228
229
            }
230
231
            throw new MethodNotFoundException('Non valid request method available.');
232
@@ 268-276 (lines=9) @@
265
                    'var'    => $var
266
                ];
267
268
            } else if ($this->requestType === 'api') {
269
270
                return [
271
                    'class'  => $data['controller'],
272
                    'action' => $this->getRestfulAction(),
273
                    'var'    => $var
274
                ];
275
276
            }
277
278
        }
279