Code Duplication    Length = 13-13 lines in 2 locations

src/Surfnet/StepupMiddleware/ManagementBundle/Controller/ConfigurationController.php 1 location

@@ 56-68 (lines=13) @@
53
     * @param Command $command
54
     * @return JsonResponse
55
     */
56
    private function handleCommand(Request $request, Command $command)
57
    {
58
        $this->pipeline->process($command);
59
60
        $serverName = $request->server->get('SERVER_NAME') ?: $request->server->get('SERVER_ADDR');
61
        $response   = new JsonResponse([
62
            'status'       => 'OK',
63
            'processed_by' => $serverName,
64
            'applied_at'   => (new DateTime())->format(DateTime::ISO8601)
65
        ]);
66
67
        return $response;
68
    }
69
}
70

src/Surfnet/StepupMiddleware/ManagementBundle/Controller/RightToBeForgottenController.php 1 location

@@ 83-95 (lines=13) @@
80
     * @param Command $command
81
     * @return JsonResponse
82
     */
83
    private function handleCommand(Request $request, Command $command)
84
    {
85
        $this->pipeline->process($command);
86
87
        $serverName = $request->server->get('SERVER_NAME') ?: $request->server->get('SERVER_ADDR');
88
        $response   = new JsonResponse([
89
            'status'       => 'OK',
90
            'processed_by' => $serverName,
91
            'applied_at'   => (new DateTime())->format(DateTime::ISO8601)
92
        ]);
93
94
        return $response;
95
    }
96
97
    /**
98
     * @param NameId      $nameId