Showing 3,246 of 4,217 total issues

Method utf2win1251 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function utf2win1251($s)
    {
        $out = '';

        for ($i = 0; $i < strlen($s); $i++) {
Severity: Minor
Found in plugins/common/classes/common/yf_translit.class.php - About 1 hr to fix

    Method load_spiders_ips has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function load_spiders_ips()
        {
            $ext = '.txt';
            $ext_len = strlen($ext);
            $pattern = '{,plugins/*/}share/spiders/*' . $ext;
    Severity: Minor
    Found in plugins/common/classes/common/yf_spider_detection.class.php - About 1 hr to fix

      Method invoice has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function invoice()
          {
              $id = (int) $_GET['id'];
              $_GET['id'] = $id;
              list($css, $html) = $this->_prepare_invoice_body($id);

        Method search_product_by_filename has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function search_product_by_filename($folder, $supplier_id = false)
            {
                $filename = basename($folder);
                $ext = pathinfo($filename, PATHINFO_EXTENSION);
                $filename = ltrim($filename, ' .-_+=/\|,!@#%~&*()');

          Method pics_browser has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function pics_browser()
              {
                  if (isset($_GET['active']) && $_GET['active'] == 1) {
                      $active = ' AND p.active = \'1\' ';
                  } elseif (isset($_GET['active']) && $_GET['active'] == 0) {

            Method _attributes_html has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _attributes_html($object_id = 0, $only_selected = false)
                {
                    $object_id = $params['object_id'];
                    $only_selected = $params['only_selected'];
            
            

              Method clone_cat has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function clone_cat()
                  {
                      $_GET['id'] = (int) ($_GET['id']);
                      if ( ! empty($_GET['id'])) {
                          $cat_info = db()->query_fetch('SELECT * FROM ' . db('categories') . ' WHERE id=' . (int) ($_GET['id']));
              Severity: Minor
              Found in plugins/categories/admin_modules/yf_category_editor.class.php - About 1 hr to fix

                Method save has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function save()
                    {
                        $lang = $_GET['page'];
                        if ( ! is_post() || ! $lang || ! isset($this->all_langs[$lang])) {
                            return js_redirect(url('/@object'));
                Severity: Minor
                Found in plugins/content/admin_modules/yf_manage_faq.class.php - About 1 hr to fix

                  Method _debug_profiling has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function _debug_profiling(&$params = [])
                      {
                          $all_timings = main()->_timing;
                          if ( ! $all_timings) {
                              return false;
                  Severity: Minor
                  Found in classes/yf_debug.class.php - About 1 hr to fix

                    Method _show_edit_widget_items has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _show_edit_widget_items($column_items = [], $ds = [])
                        {
                            $items_configs = $ds['data']['items_configs'];
                            $ds_settings = $ds['data']['settings'];
                    
                    
                    Severity: Minor
                    Found in plugins/dashboards/admin_modules/yf_manage_dashboards.class.php - About 1 hr to fix

                      Method test_fix_data_safe has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Method test_cleanup_33_2 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function test_cleanup_33_2()
                            {
                                $closure = function ($in) {
                                    return module('register')->_login_not_exists($in);
                                };
                        Severity: Minor
                        Found in .dev/tests/unit/class_validate_test.Test.php - About 1 hr to fix

                          Method test_cleanup_33_1 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function test_cleanup_33_1()
                              {
                                  $closure = function ($in) {
                                      return module('register')->_login_not_exists($in);
                                  };
                          Severity: Minor
                          Found in .dev/tests/unit/class_validate_test.Test.php - About 1 hr to fix

                            Method test_order4 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function test_order4()
                                {
                                    $url = 'http://jquery.com/jquery-wp-content/themes/jquery.com/style.css';
                                    $url1 = $url . '?v=1';
                                    $url2 = $url . '?v=2';
                            Severity: Minor
                            Found in .dev/tests/unit/class_assets_test.Test.php - About 1 hr to fix

                              Method test_select_aggregates has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function test_select_aggregates()
                                  {
                                      if ($this->_need_skip_test(__FUNCTION__)) {
                                          return;
                                      }
                              Severity: Minor
                              Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                Method test_delete has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function test_delete()
                                    {
                                        if ($this->_need_skip_test(__FUNCTION__)) {
                                            return;
                                        }
                                Severity: Minor
                                Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                  Method test_resize has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function test_resize()
                                      {
                                          if (getenv('CI') == 'jenkins') {
                                              $this->markTestSkipped('Right now we skip this test, when running inside Jenkins.');
                                          }
                                  Severity: Minor
                                  Found in .dev/tests/unit/class_images_test.Test.php - About 1 hr to fix

                                    Method test_main has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function test_main()
                                        {
                                            $this->assertEquals('0', todecimal(''));
                                            $this->assertEquals('1', todecimal(1));
                                            $this->assertEquals('-1', todecimal(-1));
                                    Severity: Minor
                                    Found in .dev/tests/unit/functions/function_todecimal_test.Test.php - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                  if ($method == 'bower' && $this->ALLOW_GET_FROM_BOWER && $_files) {
                                                      return $this->get_asset_from_bower($_name, $_version, $data, $asset_type);
                                                  } elseif ($method == 'github' && $this->ALLOW_GET_FROM_GITHUB && $_files) {
                                                      return $this->get_asset_from_github($_name, $_version, $data, $asset_type);
                                                  } elseif ($method == 'cdn' && $this->ALLOW_GET_FROM_CDN && isset($asset_data[$method]) && isset($asset_data[$method][$asset_type])) {
                                      Severity: Critical
                                      Found in plugins/assets/classes/yf_assets.class.php - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                    if (($sel_data['country_code'] && $sel_data['country_code'] != $this->_user_info['country'])
                                                        || ($sel_data['region_code'] && $sel_data['region_code'] != $this->_user_info['state'])
                                                        || ($sel_data['city_name'] && strtolower($sel_data['city_name']) != strtolower($this->_user_info['city']))
                                                        || ($sel_data['zip_code'] && $sel_data['zip_code'] != $this->_user_info['zip_code'])
                                                    ) {
                                        Severity: Critical
                                        Found in plugins/geo/modules/yf_geo_content.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language