emsa16/comment

View on GitHub

Showing 3 of 12 total issues

Method editComment has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function editComment($postid)
    {
        $actionID = (int)$this->di->request->getGet("id");
        $currentComment = $this->comments->findSoft('id', $actionID);
        if (!$currentComment) {
Severity: Minor
Found in src/Comment/CommentController.php - About 1 hr to fix

    Method replyComment has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function replyComment($postid)
        {
            $loggedInUser = $this->di->userController->getLoggedInUserId();
            if (is_null($loggedInUser)) {
                $this->di->response->redirect("comment/$postid");
    Severity: Minor
    Found in src/Comment/CommentController.php - About 1 hr to fix

      Method deleteComment has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function deleteComment($postid)
          {
              $actionID = (int)$this->di->request->getGet("id");
              $currentComment = $this->comments->findSoft('id', $actionID);
              if (!$currentComment) {
      Severity: Minor
      Found in src/Comment/CommentController.php - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language