Code Duplication    Length = 10-10 lines in 2 locations

Http/Rest/DataTableAPI.php 1 location

@@ 196-205 (lines=10) @@
193
            return $response->withStatus(401);
194
        }
195
        $obj = $request->getParsedBody();
196
        if($obj === null)
197
        {
198
            $request->getBody()->rewind();
199
            $obj = $request->getBody()->getContents();
200
            $tmp = json_decode($obj, true);
201
            if($tmp !== null)
202
            {
203
                $obj = $tmp;
204
            }
205
        }
206
        if($this->validateUpdate($obj, $request, $entry) === false)
207
        {
208
            return $response->withStatus(400);

Http/Rest/RestAPI.php 1 location

@@ 40-49 (lines=10) @@
37
    protected function getParsedBody($request)
38
    {
39
        $obj = $request->getParsedBody();
40
        if($obj === null)
41
        {
42
            $request->getBody()->rewind();
43
            $obj = $request->getBody()->getContents();
44
            $tmp = json_decode($obj, true);
45
            if($tmp !== null)
46
            {
47
                $obj = $tmp;
48
            }
49
        }
50
        return $obj;
51
    }
52