bcit-ci/CodeIgniter

View on GitHub

Showing 728 of 865 total issues

Avoid too many return statements within this method.
Open

            return FALSE;
Severity: Major
Found in system/core/Hooks.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return $output;
    Severity: Major
    Found in system/core/Security.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                              return FALSE;
      Severity: Major
      Found in system/core/compat/password.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            return FALSE;
        Severity: Major
        Found in system/core/compat/password.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              return $this->_in_progress = FALSE;
          Severity: Major
          Found in system/core/Hooks.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return $lang;
            Severity: Major
            Found in system/core/Lang.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  return $this->_in_progress = FALSE;
              Severity: Major
              Found in system/core/Hooks.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return (strlen($password = crypt($password, sprintf('$2y$%02d$%s', $options['cost'], $options['salt']))) === 60)
                            ? $password
                            : FALSE;
                Severity: Major
                Found in system/core/compat/password.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                          return TRUE;
                  Severity: Major
                  Found in system/core/Common.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return FALSE;
                    Severity: Major
                    Found in system/core/compat/hash.php - About 30 mins to fix

                      Function _mcrypt_encrypt has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          protected function _mcrypt_encrypt($data, $params)
                          {
                              if ( ! is_resource($params['handle']))
                              {
                                  return FALSE;
                      Severity: Minor
                      Found in system/libraries/Encryption.php - About 25 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 unmark_flash has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function unmark_flash($key)
                          {
                              if (empty($_SESSION['__ci_vars']))
                              {
                                  return;
                      Severity: Minor
                      Found in system/libraries/Session/Session.php - About 25 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 get_id has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function get_id($url)
                          {
                              $tb_id = '';
                      
                              if (strpos($url, '?') !== FALSE)
                      Severity: Minor
                      Found in system/libraries/Trackback.php - About 25 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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function __construct($config = array())
                          {
                              isset($config['adapter']) && $this->_adapter = $config['adapter'];
                              isset($config['backup']) && $this->_backup_driver = $config['backup'];
                              isset($config['key_prefix']) && $this->key_prefix = $config['key_prefix'];
                      Severity: Minor
                      Found in system/libraries/Cache/Cache.php - About 25 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 destroy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function destroy($session_id)
                          {
                              if ($this->_lock)
                              {
                                  // Prevent previous QB calls from messing with our queries
                      Severity: Minor
                      Found in system/libraries/Session/drivers/Session_database_driver.php - About 25 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 find_migrations has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function find_migrations()
                          {
                              $migrations = array();
                      
                              // Load all *_*.php files in the migrations path
                      Severity: Minor
                      Found in system/libraries/Migration.php - About 25 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 reply_to has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function reply_to($replyto, $name = '')
                          {
                              if (preg_match('/\<(.*)\>/', $replyto, $match))
                              {
                                  $replyto = $match[1];
                      Severity: Minor
                      Found in system/libraries/Email.php - About 25 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 initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function initialize($config = array())
                          {
                              if (count($config) > 0)
                              {
                                  foreach ($config as $key => $val)
                      Severity: Minor
                      Found in system/libraries/Xmlrpc.php - About 25 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 unmark_temp has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function unmark_temp($key)
                          {
                              if (empty($_SESSION['__ci_vars']))
                              {
                                  return;
                      Severity: Minor
                      Found in system/libraries/Session/Session.php - About 25 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 addScalar has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function addScalar($val, $type = 'string')
                          {
                              $typeof = $this->xmlrpcTypes[$type];
                      
                              if ($this->mytype === 1)
                      Severity: Minor
                      Found in system/libraries/Xmlrpc.php - About 25 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