bcit-ci/CodeIgniter

View on GitHub

Showing 728 of 865 total issues

Method read_dir has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function read_dir($path, $preserve_filepath = TRUE, $root_path = NULL)
    {
        $path = rtrim($path, '/\\').DIRECTORY_SEPARATOR;
        if ( ! $fp = @opendir($path))
        {
Severity: Minor
Found in system/libraries/Zip.php - About 1 hr to fix

    Method _parse_pair has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function _parse_pair($variable, $data, $string)
        {
            $replace = array();
            preg_match_all(
                '#'.preg_quote($this->l_delim.$variable.$this->r_delim).'(.+?)'.preg_quote($this->l_delim.'/'.$variable.$this->r_delim).'#s',
    Severity: Minor
    Found in system/libraries/Parser.php - About 1 hr to fix

      Method _add_dir has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function _add_dir($dir, $file_mtime, $file_mdate)
          {
              $dir = str_replace('\\', '/', $dir);
      
              $this->zipdata .=
      Severity: Minor
      Found in system/libraries/Zip.php - About 1 hr to fix

        Method display_error has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function display_error($error = '', $swap = '', $native = FALSE)
            {
                $LANG =& load_class('Lang', 'core');
                $LANG->load('db');
        
        
        Severity: Minor
        Found in system/database/DB_driver.php - About 1 hr to fix

          Method _create_table has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function _create_table($table, $if_not_exists, $attributes)
              {
                  if ($if_not_exists === TRUE && $this->_create_table_if === FALSE)
                  {
                      if ($this->db->table_exists($table))
          Severity: Minor
          Found in system/database/DB_forge.php - About 1 hr to fix

            Method list_tables has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function list_tables($constrain_by_prefix = FALSE)
                {
                    // Is there a cached result?
                    if (isset($this->data_cache['table_names']))
                    {
            Severity: Minor
            Found in system/database/DB_driver.php - About 1 hr to fix

              Method redirect has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function redirect($uri = '', $method = 'auto', $code = NULL)
                  {
                      if ( ! preg_match('#^(\w+:)?//#i', $uri))
                      {
                          $uri = site_url($uri);
              Severity: Minor
              Found in system/helpers/url_helper.php - About 1 hr to fix

                Method show_exception has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function show_exception($exception)
                    {
                        $templates_path = config_item('error_views_path');
                        if (empty($templates_path))
                        {
                Severity: Minor
                Found in system/core/Exceptions.php - About 1 hr to fix

                  Method entity_decode has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function entity_decode($str, $charset = NULL)
                      {
                          if (strpos($str, '&') === FALSE)
                          {
                              return $str;
                  Severity: Minor
                  Found in system/core/Security.php - About 1 hr to fix

                    Method _prepare_rules has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        protected function _prepare_rules($rules)
                        {
                            $new_rules = array();
                            $callbacks = array();
                    
                    
                    Severity: Minor
                    Found in system/libraries/Form_validation.php - About 1 hr to fix

                      Method output_parameters has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function output_parameters(array $array = array())
                          {
                              $CI =& get_instance();
                      
                              if ( ! empty($array))
                      Severity: Minor
                      Found in system/libraries/Xmlrpc.php - About 1 hr to fix

                        Method _mcrypt_encrypt has 30 lines of code (exceeds 25 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 1 hr to fix

                          Method meta has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function meta($name = '', $content = '', $type = 'name', $newline = "\n")
                              {
                                  // Since we allow the data to be passes as a string, a simple array
                                  // or a multidimensional one, we need to do a little prepping.
                                  if ( ! is_array($name))
                          Severity: Minor
                          Found in system/helpers/html_helper.php - About 1 hr to fix

                            Method __construct has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function __construct($params)
                                {
                                    parent::__construct($params);
                            
                                    if (preg_match('/([^:]+):/', $this->dsn, $match) && count($match) === 2)
                            Severity: Minor
                            Found in system/database/drivers/pdo/pdo_driver.php - About 1 hr to fix

                              Method _merge_cache has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function _merge_cache()
                                  {
                                      if (count($this->qb_cache_exists) === 0)
                                      {
                                          return;
                              Severity: Minor
                              Found in system/database/DB_query_builder.php - About 1 hr to fix

                                Method report has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function report($result = array())
                                    {
                                        if (count($result) === 0)
                                        {
                                            $result = $this->result();
                                Severity: Minor
                                Found in system/libraries/Unit_test.php - About 1 hr to fix

                                  Method upload has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function upload($locpath, $rempath, $mode = 'auto', $permissions = NULL)
                                      {
                                          if ( ! $this->_is_conn())
                                          {
                                              return FALSE;
                                  Severity: Minor
                                  Found in system/libraries/Ftp.php - About 1 hr to fix

                                    Method is_allowed_filetype has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function is_allowed_filetype($ignore_mime = FALSE)
                                        {
                                            if ($this->allowed_types === '*')
                                            {
                                                return TRUE;
                                    Severity: Minor
                                    Found in system/libraries/Upload.php - About 1 hr to fix

                                      Method _send_data has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          protected function _send_data($data)
                                          {
                                              $data .= $this->newline;
                                              for ($written = $timestamp = 0, $length = self::strlen($data); $written < $length; $written += $result)
                                              {
                                      Severity: Minor
                                      Found in system/libraries/Email.php - About 1 hr to fix

                                        Method clear has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function clear()
                                            {
                                                $props = array('thumb_marker', 'library_path', 'source_image', 'new_image', 'width', 'height', 'rotation_angle', 'x_axis', 'y_axis', 'wm_text', 'wm_overlay_path', 'wm_font_path', 'wm_shadow_color', 'source_folder', 'dest_folder', 'mime_type', 'orig_width', 'orig_height', 'image_type', 'size_str', 'full_src_path', 'full_dst_path');
                                        
                                                foreach ($props as $val)
                                        Severity: Minor
                                        Found in system/libraries/Image_lib.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language