symphonycms/symphony-2

View on GitHub

Showing 714 of 844 total issues

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

    public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
Severity: Minor
Found in symphony/lib/toolkit/fields/field.author.php - About 35 mins to fix

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

        public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
    Severity: Minor
    Found in symphony/lib/toolkit/fields/field.upload.php - About 35 mins to fix

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

          public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
      Severity: Minor
      Found in symphony/lib/toolkit/fields/field.textarea.php - About 35 mins to fix

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

            public static function replaceFieldToken($needle, $haystack, $default = null, $discard_field_name = true, $collapse = true)
        Severity: Minor
        Found in symphony/lib/toolkit/events/class.event.section.php - About 35 mins to fix

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

              public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
          Severity: Minor
          Found in symphony/lib/toolkit/fields/field.checkbox.php - About 35 mins to fix

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

                public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
            Severity: Minor
            Found in symphony/lib/toolkit/fields/field.input.php - About 35 mins to fix

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

                  public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
              Severity: Minor
              Found in symphony/lib/toolkit/fields/field.input.php - About 35 mins to fix

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

                    public function processSendMailFilter(XMLElement $result, array $send_email, array &$fields, Section $section, Entry $entry)
                Severity: Minor
                Found in symphony/lib/toolkit/events/class.event.section.php - About 35 mins to fix

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

                      public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
                  Severity: Minor
                  Found in symphony/lib/toolkit/fields/field.taglist.php - About 35 mins to fix

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

                        public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
                    Severity: Minor
                    Found in symphony/lib/toolkit/fields/field.textarea.php - About 35 mins to fix

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

                          public static function throwCustomError($message, $heading = 'Symphony Fatal Error', $status = Page::HTTP_STATUS_ERROR, $template = 'generic', array $additional = array())
                      Severity: Minor
                      Found in symphony/lib/core/class.symphony.php - About 35 mins to fix

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

                            public function __construct($success, PDOStatement $stm, DatabaseQuery $query, array $page = [], $includeTypes = false)
                        Severity: Minor
                        Found in symphony/lib/toolkit/class.pagequeryresult.php - About 35 mins to fix

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

                              public function pushToLog($message, $type = E_NOTICE, $writeToLog = false, $addbreak = true, $append = false)
                          Severity: Minor
                          Found in symphony/lib/core/class.log.php - About 35 mins to fix

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

                                public static function fetch($include_types = true, array $select = array(), array $where = array(), $order_by = null, $hierarchical = false)
                            Severity: Minor
                            Found in symphony/lib/toolkit/class.pagemanager.php - About 35 mins to fix

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

                                  public function __construct($message, $heading = 'Symphony Fatal Error', $template = 'generic', array $additional = array(), $status = Page::HTTP_STATUS_ERROR)
                              Severity: Minor
                              Found in symphony/lib/core/class.symphonyexception.php - About 35 mins to fix

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

                                    public function __appendAuthorFilter(&$wrapper, $h4_label, $name, $value = null, $templateOnly = true)
                                Severity: Minor
                                Found in symphony/content/content.blueprintsdatasources.php - About 35 mins to fix

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

                                      public static function initialize(HTMLPage $object, &$result, &$sort, &$order, array $params = array())
                                  Severity: Minor
                                  Found in symphony/content/class.sortable.php - About 35 mins to fix

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

                                        protected function viewReady()
                                        {
                                            $h2 = new XMLElement('h2', __('Updating Symphony'));
                                            $p = new XMLElement('p', __('This script will update your existing Symphony installation to version %s.', array('<code>' . $this->params['version'] . '</code>')));
                                    
                                    
                                    Severity: Minor
                                    Found in install/lib/class.updaterpage.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 validateRequest has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public static function validateRequest($silent = false)
                                        {
                                            // Only care if we have a POST request.
                                            if (count($_POST) > 0) {
                                                if (!self::validateToken($_POST["xsrf"])) {
                                    Severity: Minor
                                    Found in symphony/lib/toolkit/class.xsrf.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 Table has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public static function Table(XMLElement $header = null, XMLElement $footer = null, XMLElement $body = null, $class = null, $id = null, Array $attributes = null)
                                        {
                                            General::ensureType(array(
                                                'class' => array('var' => $class, 'type' => 'string', 'optional' => true),
                                                'id' => array('var' => $id, 'type' => 'string', 'optional' => true)
                                    Severity: Minor
                                    Found in symphony/lib/toolkit/class.widget.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