Code Duplication    Length = 10-10 lines in 2 locations

src/Controller/Endpoint/AlertEndpointController.php 2 locations

@@ 42-51 (lines=10) @@
39
     *
40
     * @return array
41
     */
42
    public function getSingle(Request $request, Response $response, array $args)
43
    {
44
        $alert = $this->repository->readSingleById($args['id']);
45
46
        if (empty($alert)) {
47
            return $this->errorEmpty($response);
48
        }
49
50
        return $this->respond('item', $alert, $this->transformer, $request, $response);
51
    }
52
53
    public function getActives(Request $request, Response $response)
54
    {
@@ 53-62 (lines=10) @@
50
        return $this->respond('item', $alert, $this->transformer, $request, $response);
51
    }
52
53
    public function getActives(Request $request, Response $response)
54
    {
55
        $actives = $this->repository->readAllByField('InProgress', 1);
56
57
        if (empty($actives)) {
58
            return $this->errorEmpty($response);
59
        }
60
61
        return $this->respond('collection', $actives, $this->transformer, $request, $response);
62
    }
63
}
64