bcit-ci/CodeIgniter

View on GitHub

Showing 728 of 865 total issues

Method read has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function read($session_id)
    {
        if ($this->_get_lock($session_id) === FALSE)
        {
            return $this->_failure;
Severity: Minor
Found in system/libraries/Session/drivers/Session_database_driver.php - About 1 hr to fix

    Method form_hidden has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function form_hidden($name, $value = '', $recursing = FALSE)
        {
            static $form;
    
            if ($recursing === FALSE)
    Severity: Minor
    Found in system/helpers/form_helper.php - About 1 hr to fix

      Method _track_aliases has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function _track_aliases($table)
          {
              if (is_array($table))
              {
                  foreach ($table as $t)
      Severity: Minor
      Found in system/database/DB_query_builder.php - About 1 hr to fix

        Method list_fields has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function list_fields($table)
            {
                if (FALSE === ($sql = $this->_list_columns($table)))
                {
                    return ($this->db_debug) ? $this->display_error('db_unsupported_function') : FALSE;
        Severity: Minor
        Found in system/database/DB_driver.php - About 1 hr to fix

          Method get_dir_file_info has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function get_dir_file_info($source_dir, $top_level_only = TRUE, $_recursion = FALSE)
              {
                  static $_filedata = array();
                  $relative_path = $source_dir;
          
          
          Severity: Minor
          Found in system/helpers/file_helper.php - About 1 hr to fix

            Method count_all_results has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function count_all_results($table = '', $reset = TRUE)
                {
                    if ($table !== '')
                    {
                        $this->_track_aliases($table);
            Severity: Minor
            Found in system/database/DB_query_builder.php - About 1 hr to fix

              Method _set_request has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function _set_request($segments = array())
                  {
                      $segments = $this->_validate_request($segments);
                      // If we don't have any segments left - try the default controller;
                      // WARNING: Directories get shifted out of the segments array!
              Severity: Minor
              Found in system/core/Router.php - About 1 hr to fix

                Function set_radio has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function set_radio($field = '', $value = '', $default = FALSE)
                    {
                        if ( ! isset($this->_field_data[$field], $this->_field_data[$field]['postdata']))
                        {
                            return ($default === TRUE && count($this->_field_data) === 0) ? ' checked="checked"' : '';
                Severity: Minor
                Found in system/libraries/Form_validation.php - About 55 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 decode has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function decode($array = NULL)
                    {
                        $CI =& get_instance();
                
                        if (is_array($array))
                Severity: Minor
                Found in system/libraries/Xmlrpc.php - About 55 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 decrypt has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function decrypt($data, array $params = NULL)
                    {
                        if (($params = $this->_get_params($params)) === FALSE)
                        {
                            return FALSE;
                Severity: Minor
                Found in system/libraries/Encryption.php - About 55 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 _openssl_initialize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function _openssl_initialize($params)
                    {
                        if ( ! empty($params['cipher']))
                        {
                            $params['cipher'] = strtolower($params['cipher']);
                Severity: Minor
                Found in system/libraries/Encryption.php - About 55 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 image_reproportion has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function image_reproportion()
                    {
                        if (($this->width === 0 && $this->height === 0) OR $this->orig_width === 0 OR $this->orig_height === 0
                            OR ( ! ctype_digit((string) $this->width) && ! ctype_digit((string) $this->height))
                            OR ! ctype_digit((string) $this->orig_width) OR ! ctype_digit((string) $this->orig_height))
                Severity: Minor
                Found in system/libraries/Image_lib.php - About 55 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 write has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function write($session_id, $session_data)
                    {
                        if ( ! isset($this->_memcached, $this->_lock_key))
                        {
                            return $this->_failure;
                Severity: Minor
                Found in system/libraries/Session/drivers/Session_memcached_driver.php - About 55 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 parse_template has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function parse_template()
                    {
                        $this->replacements = $this->default_template();
                
                        if (empty($this->template))
                Severity: Minor
                Found in system/libraries/Calendar.php - About 55 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 _prepare_rules has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function _prepare_rules($rules)
                    {
                        $new_rules = array();
                        $callbacks = array();
                
                
                Severity: Minor
                Found in system/libraries/Form_validation.php - About 55 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 set_select has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function set_select($field = '', $value = '', $default = FALSE)
                    {
                        if ( ! isset($this->_field_data[$field], $this->_field_data[$field]['postdata']))
                        {
                            return ($default === TRUE && count($this->_field_data) === 0) ? ' selected="selected"' : '';
                Severity: Minor
                Found in system/libraries/Form_validation.php - About 55 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 list_fields has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function list_fields($table)
                    {
                        if (FALSE === ($sql = $this->_list_columns($table)))
                        {
                            return ($this->db_debug) ? $this->display_error('db_unsupported_function') : FALSE;
                Severity: Minor
                Found in system/database/DB_driver.php - About 55 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 field_data has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function field_data($table)
                    {
                        if (strpos($table, '.') !== FALSE)
                        {
                            sscanf($table, '%[^.].%s', $owner, $table);
                Severity: Minor
                Found in system/database/drivers/pdo/subdrivers/pdo_oci_driver.php - About 55 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 set_update_batch has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function set_update_batch($key, $index = '', $escape = NULL)
                    {
                        $key = $this->_object_to_array_batch($key);
                
                        if ( ! is_array($key))
                Severity: Minor
                Found in system/database/DB_query_builder.php - About 55 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 compile_binds has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function compile_binds($sql, $binds)
                    {
                        if (empty($binds) OR empty($this->bind_marker) OR strpos($sql, $this->bind_marker) === FALSE)
                        {
                            return $sql;
                Severity: Minor
                Found in system/database/drivers/odbc/odbc_driver.php - About 55 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