Showing 3,246 of 4,217 total issues

Method get_deep_array has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function get_deep_array($sql, $max_levels = 0, $use_cache = true)
    {
        if ( ! strlen($sql)) {
            return false;
        }
Severity: Minor
Found in plugins/db/classes/yf_db.class.php - About 1 hr to fix

    Method _save_query_revision has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function _save_query_revision($method, $table, $params = [])
        {
            if (($allowed_methods = $this->QUERY_REVISIONS_METHODS)) {
                if ( ! in_array($method, $allowed_methods)) {
                    return false;
    Severity: Minor
    Found in plugins/db/classes/yf_db.class.php - About 1 hr to fix

      Method rotate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function rotate($source_file_path, $dest_file_path, $ANGLE)
          {
              // Check source file
              if ( ! file_exists($source_file_path) || ! filesize($source_file_path) || ! is_readable($source_file_path)) {
                  trigger_error('ROTATE_IMG: Source file is empty', E_USER_WARNING);
      Severity: Minor
      Found in plugins/common/classes/common/yf_image_manip.class.php - About 1 hr to fix

        Method upload_file has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function upload_file()
            {
                no_graphics(true);
                if ( ! MAIN_TYPE_ADMIN) {
                    return print 'access denied';
        Severity: Minor
        Found in plugins/ckeditor/admin_modules/yf_ck_file_browser.class.php - About 1 hr to fix

          Method _sql has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _sql($options = [])
              {
                  // get options
                  $_ = &$options;
                  $fields = (array) $_['fields'] ?: [];

            Method delete has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function delete()
                {
                    $user_id = (int) ($_GET['id']);
                    if ( ! $user_id) {
                        return false;
            Severity: Minor
            Found in plugins/user/admin_modules/yf_manage_users.class.php - About 1 hr to fix

              Method products_similar_by_price has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function products_similar_by_price($price, $id)
                  {
                      $price_min = floor($price - ($price * 10 / 100));
                      $price_max = ceil($price + ($price * 10 / 100));
                      $sql1 = 'SELECT category_id FROM ' . db('shop_product_to_category') . ' WHERE product_id =  ' . $id . '';

                Method replace has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function replace($start_dirs, $pattern_include = '', $pattern_exclude = '', $pattern_find, $pattern_replace)
                    {
                        $files = [];
                        if ( ! is_array($start_dirs)) {
                            $start_dirs = [$start_dirs];
                Severity: Minor
                Found in classes/yf_dir.class.php - About 1 hr to fix

                  Method grep has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function grep($pattern_find, $start_dirs, $pattern_path = '*', $extra = [])
                      {
                          if ( ! $pattern_find) {
                              return false;
                          }
                  Severity: Minor
                  Found in classes/yf_dir.class.php - About 1 hr to fix

                    Method resend_code has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function resend_code()
                        {
                            if ( ! empty($_POST['email'])) {
                                $user_info = db()->query_fetch('SELECT * FROM ' . db('user') . ' WHERE email="' . _es($_POST['email']) . '"');
                                if (empty($user_info)) {
                    Severity: Minor
                    Found in plugins/user/modules/yf_register.class.php - About 1 hr to fix

                      Method copy_dir has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function copy_dir($path1, $path2, $pattern_include = '', $pattern_exclude = '', $level = null)
                          {
                              if ( ! $path1 || ! file_exists($path1)) {
                                  return false;
                              }
                      Severity: Minor
                      Found in classes/yf_dir.class.php - About 1 hr to fix

                        Method _format_date has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function _format_date($input_date = '', $type = 'short')
                            {
                                if ( ! strlen($input_date)) {
                                    return '';
                                }
                        Severity: Minor
                        Found in classes/yf_utils.class.php - About 1 hr to fix

                          Method test__parse_column_type has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function test__parse_column_type()
                              {
                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                      return;
                                  }
                          Severity: Minor
                          Found in .dev/tests/functional/db/class_db_real_utils_pgsql.TODO.php - About 1 hr to fix

                            Method require_php_lib has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function require_php_lib($name, $params = [])
                                {
                                    if (isset($this->php_libs[$name])) {
                                        return $this->php_libs[$name];
                                    }
                            Severity: Minor
                            Found in classes/yf_services.class.php - About 1 hr to fix

                              Method test_order5 has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function test_order5()
                                  {
                                      $jquery_url = _class('assets')->get_asset('jquery', 'js');
                                      $url = $jquery_url;
                                      $url1 = $url . '?v=1';
                              Severity: Minor
                              Found in .dev/tests/unit/class_assets_test.Test.php - About 1 hr to fix

                                Method test_prepare_html has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function test_prepare_html()
                                    {
                                        $this->assertEquals('test', _prepare_html('test'));
                                        $this->assertEquals('test' . PHP_EOL . 'test', _prepare_html('test' . PHP_EOL . 'test'));
                                        $this->assertEquals('{', _prepare_html('{'));
                                Severity: Minor
                                Found in .dev/tests/unit/functions/function_prepare_html_test.Test.php - About 1 hr to fix

                                  Method test_basic has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function test_basic()
                                      {
                                          $this->assertFalse(wildcard_compare('regex are useful', ''));
                                          $this->assertFalse(wildcard_compare('regex are * useful', ''));
                                          $this->assertFalse(wildcard_compare('regex are * useful', 'regex'));
                                  Severity: Minor
                                  Found in .dev/tests/unit/functions/function_wildcard_compare_test.Test.php - About 1 hr to fix

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

                                        public function autotranslate()
                                        {
                                            $a['back_link'] = url('/@object/vars');
                                            $a['redirect_link'] = $a['back_link'];
                                            ! $a['lang_from'] && $a['lang_from'] = 'en';

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

                                          public function _sub_add($info, $asset_type, $_params = [])
                                          {
                                              if ( ! $info) {
                                                  return false;
                                              }
                                      Severity: Minor
                                      Found in plugins/assets/classes/yf_assets.class.php - About 1 hr to fix

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

                                            public function collect()
                                            {
                                                $defaults = [
                                                    'back_link' => url('/@object/vars'),
                                                    'redirect_link' => url('/@object/vars'),
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language