piotrpolak/pepiscms

View on GitHub

Showing 485 of 486 total issues

Avoid too many return statements within this method.
Open

        return '';
Severity: Major
Found in pepiscms/modules/logs/libraries/LogsRowFormattingUtility.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return $content;
    Severity: Major
    Found in pepiscms/modules/logs/controllers/LogsAdmin.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return false;
      Severity: Major
      Found in pepiscms/application/core/PEPISCMS_Hooks.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return false;
        Severity: Major
        Found in pepiscms/modules/cms_users/controllers/Cms_usersAdmin.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return false;
          Severity: Major
          Found in pepiscms/application/core/PEPISCMS_Hooks.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return $this->_in_progress = false;
            Severity: Major
            Found in pepiscms/application/core/PEPISCMS_Hooks.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return '<span style="background-color: #FF9F9F; padding: 2px; display: block;">' . $this->level_labels[$content] . '</span>';
              Severity: Major
              Found in pepiscms/modules/logs/controllers/LogsAdmin.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return true;
                Severity: Major
                Found in pepiscms/modules/cms_users/controllers/Cms_usersAdmin.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return false;
                  Severity: Major
                  Found in pepiscms/modules/crud/libraries/AdminCRUDController.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                        return $this->_in_progress = false;
                    Severity: Major
                    Found in pepiscms/application/core/PEPISCMS_Hooks.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return $this->_in_progress = false;
                      Severity: Major
                      Found in pepiscms/application/core/PEPISCMS_Hooks.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return true;
                        Severity: Major
                        Found in pepiscms/modules/crud/libraries/AdminCRUDController.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                  return true;
                          Severity: Major
                          Found in pepiscms/application/core/PEPISCMS_Lang.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return false;
                            Severity: Major
                            Found in pepiscms/modules/crud/libraries/AdminCRUDController.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return false;
                              Severity: Major
                              Found in pepiscms/modules/pages/controllers/PagesAdmin.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return FormBuilder::TIMESTAMP;
                                Severity: Major
                                Found in pepiscms/modules/crud/libraries/TableUtility.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                              return FormBuilder::PASSWORD;
                                  Severity: Major
                                  Found in pepiscms/modules/crud/libraries/TableUtility.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return true;
                                    Severity: Major
                                    Found in pepiscms/modules/pages/controllers/PagesAdmin.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return FormBuilder::TEXTFIELD;
                                      Severity: Major
                                      Found in pepiscms/modules/crud/libraries/TableUtility.php - About 30 mins to fix

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

                                            public function getAvailableThemes()
                                            {
                                                $theme_path = $this->config->item('theme_path');
                                                $dir = opendir($theme_path);
                                        
                                        
                                        Severity: Minor
                                        Found in pepiscms/application/models/Siteconfig_model.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