panique/huge

View on GitHub

Showing 37 of 37 total issues

Avoid too many return statements within this method.
Open

        return false;
Severity: Major
Found in application/model/UserModel.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return true;
    Severity: Major
    Found in application/model/LoginModel.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return false;
      Severity: Major
      Found in application/model/UserModel.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return true;
        Severity: Major
        Found in application/model/PasswordResetModel.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return false;
          Severity: Major
          Found in application/model/PasswordResetModel.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return true;
            Severity: Major
            Found in application/model/RegistrationModel.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return true;
              Severity: Major
              Found in application/model/PasswordResetModel.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return false;
                Severity: Major
                Found in application/model/LoginModel.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return true;
                  Severity: Major
                  Found in application/model/UserModel.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return false;
                    Severity: Major
                    Found in application/model/LoginModel.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return false;
                      Severity: Major
                      Found in application/model/RegistrationModel.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return true;
                        Severity: Major
                        Found in application/model/AvatarModel.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return true;
                          Severity: Major
                          Found in application/model/PasswordResetModel.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                    return false;
                            Severity: Major
                            Found in application/model/PasswordResetModel.php - About 30 mins to fix

                              Function sendMailWithPHPMailer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function sendMailWithPHPMailer($user_email, $from_email, $from_name, $subject, $body)
                                  {
                                      $mail = new PHPMailer;
                                      
                                      // you should use UTF-8 to avoid encoding issues
                              Severity: Minor
                              Found in application/core/Mail.php - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function setAccountSuspensionAndDeletionStatus has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public static function setAccountSuspensionAndDeletionStatus($suspensionInDays, $softDelete, $userId)
                                  {
                              
                                      // Prevent to suspend or delete own account.
                                      // If admin suspend or delete own account will not be able to do any action.
                              Severity: Minor
                              Found in application/model/AdminModel.php - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function get has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public static function get($key, $data = null)
                                  {
                                      // if not $key
                                      if (!$key) {
                                          return null;
                              Severity: Minor
                              Found in application/core/Text.php - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Severity
                              Category
                              Status
                              Source
                              Language