piotrpolak/pepiscms

View on GitHub

Showing 481 of 486 total issues

Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

    Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

      Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

        Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

          Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes);

            Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

              Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

                Method addMetaAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    protected function addMetaAction($link_pattern, $label_pattern, $css_class = false, $is_popup = null, $target = false)
                Severity: Minor
                Found in pepiscms/modules/crud/libraries/AdminCRUDController.php - About 35 mins to fix

                  Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

                    Method generatePublicStuffIfNeccesary has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        private function generatePublicStuffIfNeccesary($generate_public_controller, $directory, $module_name_lower_case, $template_base_path, array $data)
                    Severity: Minor
                    Found in pepiscms/modules/development/libraries/ModuleGenerator.php - About 35 mins to fix

                      Method setModuleLanguageField has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public function setModuleLanguageField($module, $lang_name, $key, $value, $language_file = false)
                      Severity: Minor
                      Found in pepiscms/modules/translator/libraries/LanguageHelper.php - About 35 mins to fix

                        Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

                          Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

                            Method renderComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)

                              Method generateOrRegenerateModel has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  private function generateOrRegenerateModel($directory, $module_name_lower_case, $module_name_singular, $template_base_path, array $data)
                              Severity: Minor
                              Found in pepiscms/modules/development/libraries/ModuleGenerator.php - About 35 mins to fix

                                Method formatCells has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                function formatCells($menu, $level, &$lang, &$url_suffix, $site_language)
                                Severity: Minor
                                Found in pepiscms/modules/pages/views/admin/index_simple.php - About 35 mins to fix

                                  Function getAvailableModules has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public static function getAvailableModules()
                                      {
                                          $modules_dir = INSTALLATIONPATH . 'modules/';
                                          $modules = scandir($modules_dir);
                                          $modules_out = array();
                                  Severity: Minor
                                  Found in pepiscms/application/libraries/ModuleRunner.php - About 35 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 getBreadcrumbMenuItems has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function getBreadcrumbMenuItems()
                                      {
                                          $breadcrumb_items = array();
                                          $item = $this->getMenu()->getMenuItemByCanonicalAbsoluteUrl($this->getCanonicalAbsoluteUrl());
                                  
                                  
                                  Severity: Minor
                                  Found in pepiscms/application/libraries/Document.php - About 35 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 applyOffset has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      protected function applyOffset($output, $offset, $rowCount)
                                      {
                                          $filtered_output = array();
                                  
                                          $current_index = -1;
                                  Severity: Minor
                                  Found in pepiscms/application/models/Array_model.php - About 35 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 log_message has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function log_message($level = 'error', $message, $php_error = false)
                                  {
                                      if (!class_exists('Logger')) {
                                          return;
                                      }
                                  Severity: Minor
                                  Found in pepiscms/application/hooks/BootstapHook.php - About 35 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