Code Duplication    Length = 7-8 lines in 4 locations

src/ServiceProvider/RouteProvider.php 4 locations

@@ 50-57 (lines=8) @@
47
            $controller->index($request, $response);
48
        })->setName('home');
49
50
        $app->get('/run/view', static function () use ($di, $app) {
51
            /** @var Controller\RunController $controller */
52
            $controller = $app->controller = $di['runController'];
53
            $request = $app->request();
54
            $response = $app->response();
55
56
            $controller->view($request, $response);
57
        })->setName('run.view');
58
59
        $app->get('/run/delete', static function () use ($di, $app) {
60
            /** @var Controller\RunController $controller */
@@ 87-93 (lines=7) @@
84
            $controller->deleteAllSubmit();
85
        })->setName('run.deleteAll.submit');
86
87
        $app->get('/url/view', static function () use ($di, $app) {
88
            /** @var Controller\RunController $controller */
89
            $controller = $app->controller = $di['runController'];
90
            $request = $app->request();
91
92
            $controller->url($request);
93
        })->setName('url.view');
94
95
        $app->get('/run/compare', static function () use ($di, $app) {
96
            /** @var Controller\RunController $controller */
@@ 127-134 (lines=8) @@
124
            $controller->callgraph($request);
125
        })->setName('run.callgraph');
126
127
        $app->get('/run/callgraph/data', static function () use ($di, $app) {
128
            /** @var Controller\RunController $controller */
129
            $controller = $di['runController'];
130
            $request = $app->request();
131
            $response = $app->response();
132
133
            $controller->callgraphData($request, $response);
134
        })->setName('run.callgraph.data');
135
136
        $app->get('/run/callgraph/dot', static function () use ($di, $app) {
137
            /** @var Controller\RunController $controller */
@@ 136-143 (lines=8) @@
133
            $controller->callgraphData($request, $response);
134
        })->setName('run.callgraph.data');
135
136
        $app->get('/run/callgraph/dot', static function () use ($di, $app) {
137
            /** @var Controller\RunController $controller */
138
            $controller = $di['runController'];
139
            $request = $app->request();
140
            $response = $app->response();
141
142
            $controller->callgraphDataDot($request, $response);
143
        })->setName('run.callgraph.dot');
144
145
        // Import route
146
        $app->post('/run/import', static function () use ($di, $app) {