Code Duplication    Length = 6-6 lines in 2 locations

src/delivery/web/adapters/silex/SilexControllerProvider.php 2 locations

@@ 41-46 (lines=6) @@
38
                return $execution->handleGet(null);
39
            });
40
        });
41
        $controller->get('/{action}', function (Request $request, $action) {
42
            return $this->respond($request, function (BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) {
43
                $execution = new ExecutionResource($this->domin, $reader, $crumbs);
44
                return $execution->handleGet($action, $request->get(ExecutionResource::TOKEN_ARG));
45
            });
46
        });
47
        $controller->post('/{action}', function (Request $request, $action) {
48
            return $this->respond($request, function (BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) {
49
                $execution = new ExecutionResource($this->domin, $reader, $crumbs);
@@ 47-52 (lines=6) @@
44
                return $execution->handleGet($action, $request->get(ExecutionResource::TOKEN_ARG));
45
            });
46
        });
47
        $controller->post('/{action}', function (Request $request, $action) {
48
            return $this->respond($request, function (BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) {
49
                $execution = new ExecutionResource($this->domin, $reader, $crumbs);
50
                return $execution->handlePost($action, $request->get(ExecutionResource::TOKEN_ARG));
51
            });
52
        });
53
54
        return $controller;
55
    }