bcit-ci/CodeIgniter

View on GitHub

Showing 728 of 865 total issues

Method get_config has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function &get_config(Array $replace = array())
    {
        static $config;

        if (empty($config))
Severity: Minor
Found in system/core/Common.php - About 1 hr to fix

    Method csrf_verify has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function csrf_verify()
        {
            // If it's not a POST request we will set the CSRF cookie
            if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST')
            {
    Severity: Minor
    Found in system/core/Security.php - About 1 hr to fix

      Function delete_dir has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function delete_dir($filepath)
          {
              if ( ! $this->_is_conn())
              {
                  return FALSE;
      Severity: Minor
      Found in system/libraries/Ftp.php - About 1 hr 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 mirror has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function mirror($locpath, $rempath)
          {
              if ( ! $this->_is_conn())
              {
                  return FALSE;
      Severity: Minor
      Found in system/libraries/Ftp.php - About 1 hr 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 serializedata has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function serializedata($typ, $val)
          {
              $rs = '';
      
              switch ($this->xmlrpcTypes[$typ])
      Severity: Minor
      Found in system/libraries/Xmlrpc.php - About 1 hr 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 is_allowed_dimensions has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function is_allowed_dimensions()
          {
              if ( ! $this->is_image())
              {
                  return TRUE;
      Severity: Minor
      Found in system/libraries/Upload.php - About 1 hr 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 mark_as_temp has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function mark_as_temp($key, $ttl = 300)
          {
              $ttl += time();
      
              if (is_array($key))
      Severity: Minor
      Found in system/libraries/Session/Session.php - About 1 hr 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 batch_bcc_send has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function batch_bcc_send()
          {
              $float = $this->bcc_batch_size - 1;
              $set = '';
              $chunk = array();
      Severity: Minor
      Found in system/libraries/Email.php - About 1 hr 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 _mcrypt_decrypt has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function _mcrypt_decrypt($data, $params)
          {
              if ( ! is_resource($params['handle']))
              {
                  return FALSE;
      Severity: Minor
      Found in system/libraries/Encryption.php - About 1 hr 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 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function write($session_id, $session_data)
          {
              // Prevent previous QB calls from messing with our queries
              $this->_db->reset_query();
      
      
      Severity: Minor
      Found in system/libraries/Session/drivers/Session_database_driver.php - About 1 hr 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 _attributes_to_string has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          function _attributes_to_string($attributes)
          {
              if (empty($attributes))
              {
                  return '';
      Severity: Minor
      Found in system/helpers/form_helper.php - About 1 hr 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 _track_aliases has a Cognitive Complexity of 11 (exceeds 5 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

      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 human_to_unix has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          function human_to_unix($datestr = '')
          {
              if ($datestr === '')
              {
                  return FALSE;
      Severity: Minor
      Found in system/helpers/date_helper.php - About 1 hr 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 convert_accented_characters has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          function convert_accented_characters($str)
          {
              static $array_from, $array_to;
      
              if ( ! is_array($array_from))
      Severity: Minor
      Found in system/helpers/text_helper.php - About 1 hr 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 doctype has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          function doctype($type = 'html5')
          {
              static $doctypes;
      
              if ( ! is_array($doctypes))
      Severity: Minor
      Found in system/helpers/html_helper.php - About 1 hr 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_select has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function _compile_select($select_override = FALSE)
          {
              // Combine any cached components with the current statements
              $this->_merge_cache();
      
      
      Severity: Minor
      Found in system/database/DB_query_builder.php - About 1 hr 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 custom_result_object has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function custom_result_object($class_name)
          {
              if (isset($this->custom_result_object[$class_name]))
              {
                  return $this->custom_result_object[$class_name];
      Severity: Minor
      Found in system/database/DB_result.php - About 1 hr 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 remove_package_path has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function remove_package_path($path = '')
          {
              $config =& $this->_ci_get_component('config');
      
              if ($path === '')
      Severity: Minor
      Found in system/core/Loader.php - About 1 hr 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 delete_cache has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function delete_cache($uri = '')
          {
              $CI =& get_instance();
              $cache_path = $CI->config->item('cache_path');
              if ($cache_path === '')
      Severity: Minor
      Found in system/core/Output.php - About 1 hr 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 xss_clean has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function xss_clean($str, $is_image = FALSE)
          {
              // Is the string an array?
              if (is_array($str))
              {
      Severity: Minor
      Found in system/core/Security.php - About 1 hr 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