Code Duplication    Length = 5-5 lines in 2 locations

src/Presenters/ApiPresenter.php 2 locations

@@ 91-95 (lines=5) @@
88
89
    private function checkAuth($authorization)
90
    {
91
        if (!$authorization->authorized()) {
92
            $this->getHttpResponse()->setCode(Response::S403_FORBIDDEN);
93
            $this->sendResponse(new JsonResponse(['status' => 'error', 'message' => $authorization->getErrorMessage()]));
94
            return false;
95
        }
96
        return true;
97
    }
98
@@ 102-106 (lines=5) @@
99
    private function processParams($handler)
100
    {
101
        $paramsProcessor = new ParamsProcessor($handler->params());
102
        if ($paramsProcessor->isError()) {
103
            $this->getHttpResponse()->setCode(Response::S500_INTERNAL_SERVER_ERROR);
104
            $this->sendResponse(new JsonResponse(['status' => 'error', 'message' => 'wrong input']));
105
            return false;
106
        }
107
        return $paramsProcessor->getValues();
108
    }
109