piotrpolak/pepiscms

View on GitHub

Showing 482 of 487 total issues

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 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/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 true;
          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 '';
            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 '<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 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/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/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::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::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::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

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

                                      public function describeSystemControllers()
                                      {
                                          $controllers = array();
                                  
                                          $path = APPPATH . 'controllers/admin/';
                                  Severity: Minor
                                  Found in pepiscms/application/libraries/SecurityPolicy.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 update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function update($module_name, $is_displayed_in_menu = false, $is_displayed_in_utilities = true, $parent_module_id = false)
                                      {
                                          // Reading module info
                                          $module_info = $this->getInfoByName($module_name);
                                  
                                  
                                  Severity: Minor
                                  Found in pepiscms/application/models/Module_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

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

                                      public function setMappedFilterFields($fields_array)
                                      {
                                          if (!$fields_array || count($fields_array) == 0) {
                                              $this->mapped_filter_fields = array();
                                              return true;
                                  Severity: Minor
                                  Found in pepiscms/application/models/Generic_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