symphonycms/symphony-2

View on GitHub

Showing 714 of 844 total issues

Method createHandle has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static function createHandle($string, $max_length = 255, $delim = '-', $uriencode = false, $apply_transliteration = true, $additional_rule_set = null)
Severity: Minor
Found in symphony/lib/toolkit/class.lang.php - About 45 mins to fix

    Method contentInfoString has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        protected function contentInfoString($type = null, $file = null, $filename = null, $charset = null, $cid = false, $disposition = 'attachment')
    Severity: Minor
    Found in symphony/lib/toolkit/class.emailgateway.php - About 45 mins to fix

      Function addElementToHead has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          public function addElementToHead(XMLElement $object, $position = null, $allowDuplicate = true)
          {
              // find the right position
              if (($position && isset($this->_head[$position]))) {
                  $position = General::array_find_available_index($this->_head, $position);
      Severity: Minor
      Found in symphony/lib/toolkit/class.htmlpage.php - About 45 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

      Method displayPublishPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null)
      Severity: Minor
      Found in symphony/lib/toolkit/fields/field.author.php - About 45 mins to fix

        Method displayPublishPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null)
        Severity: Minor
        Found in symphony/lib/toolkit/fields/field.select.php - About 45 mins to fix

          Function renderHtml has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              protected static function renderHtml($e)
              {
                  // Validate the type, resolve to a 404 if not valid
                  if (!ExceptionHandler::isValidThrowable($e)) {
                      $e = new FrontendPageNotFoundException();
          Severity: Minor
          Found in symphony/lib/toolkit/class.databaseexceptionrenderer.php - About 45 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

          Method displayPublishPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null)
          Severity: Minor
          Found in symphony/lib/toolkit/fields/field.input.php - About 45 mins to fix

            Function processRawFieldData has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
                {
                    $status = self::__OK__;
                    $timestamp = null;
            
            
            Severity: Minor
            Found in symphony/lib/toolkit/fields/field.date.php - About 45 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

            Method displayPublishPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null)
            Severity: Minor
            Found in symphony/lib/toolkit/fields/field.textarea.php - About 45 mins to fix

              Function doesAuthorHaveAccess has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function doesAuthorHaveAccess($item_limit = null)
                  {
                      $can_access = false;
              
                      if (!isset($item_limit) || $item_limit === 'author') {
              Severity: Minor
              Found in symphony/lib/toolkit/class.administrationpage.php - About 45 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 findAndAddDynamicOptions has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function findAndAddDynamicOptions(&$values)
                  {
                      if (!is_array($values)) {
                          $values = [];
                      }
              Severity: Minor
              Found in symphony/lib/toolkit/fields/field.select.php - About 45 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

              Method displayPublishPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null)
              Severity: Minor
              Found in symphony/lib/toolkit/fields/field.taglist.php - About 45 mins to fix

                Method displayPublishPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null)
                Severity: Minor
                Found in symphony/lib/toolkit/fields/field.checkbox.php - About 45 mins to fix

                  Method displayPublishPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null)
                  Severity: Minor
                  Found in symphony/lib/toolkit/fields/field.upload.php - About 45 mins to fix

                    Function appendFormattedElement has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
                        {
                            $attributes = array();
                    
                            if (!is_null($mode)) {
                    Severity: Minor
                    Found in symphony/lib/toolkit/fields/field.textarea.php - About 45 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

                    Method displayPublishPanel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public function displayPublishPanel(XMLElement &$wrapper, $data = null, $flagWithError = null, $fieldnamePrefix = null, $fieldnamePostfix = null, $entry_id = null)
                    Severity: Minor
                    Found in symphony/lib/toolkit/fields/field.date.php - About 45 mins to fix

                      Function checkExtensionsForUpdates has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function checkExtensionsForUpdates()
                          {
                              $extensions = Symphony::ExtensionManager()->listInstalledHandles();
                      
                              if (is_array($extensions) && !empty($extensions)) {
                      Severity: Minor
                      Found in symphony/lib/core/class.administration.php - About 45 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 orderBy has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function orderBy($cols, $direction = 'ASC')
                          {
                              $orders = [];
                              $randoms = ['RAND()', 'RANDOM()'];
                              if (!is_array($cols)) {
                      Severity: Minor
                      Found in symphony/lib/toolkit/class.databasequery.php - About 45 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 findChildren has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function findChildren($parent_id, array $pages)
                          {
                              if (!is_array($pages)) {
                                  return [];
                              }
                      Severity: Minor
                      Found in symphony/lib/toolkit/class.pagequeryresult.php - About 45 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 execute has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function execute(array &$param_pool = null)
                          {
                              $result = new XMLElement($this->dsParamROOTELEMENT);
                              $this->dsParamSTATIC = stripslashes($this->dsParamSTATIC);
                      
                      
                      Severity: Minor
                      Found in symphony/lib/toolkit/data-sources/class.datasource.static.php - About 45 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