Showing 3,246 of 4,217 total issues

Method multi_file_size has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function multi_file_size($page_urls, $options = [], $max_threads = 50)
    {
        if (empty($max_threads)) {
            $max_threads = $this->CURL_DEF_MAX_THREADS;
        }
Severity: Minor
Found in plugins/common/classes/common/yf_remote_files.class.php - About 1 hr to fix

    Method go has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function go($new_file_path, $name_in_form = 'archive')
        {
            ignore_user_abort(true);
            if (empty($new_file_path)) {
                trigger_error(__CLASS__ . ': New file path id required', E_USER_WARNING);
    Severity: Minor
    Found in plugins/common/classes/common/yf_upload_archive.class.php - About 1 hr to fix

      Method unit_edit has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function unit_edit()
          {
              $_GET['id'] = (int) ($_GET['id']);
              if (empty($_GET['id'])) {
                  return _e('Empty ID!');

        Method product_images_revisions_view has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function product_images_revisions_view()
            {
                $sql = 'SELECT r.*, p.name
                        FROM ' . db('shop_product_images_revisions') . ' as r
                        RIGHT JOIN ' . db('shop_products') . ' as p

          Method _field_to_sql__manufacturer_name has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function _field_to_sql__manufacturer_name($field, $value, $action = null)
              {
                  if ($action == 'check') {
                      return  [$field, $value];
                  }

            Method products_similar_by_basket has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function products_similar_by_basket($id)
                {
                    $sql_order_id = 'SELECT order_id FROM ' . db('shop_order_items') . ' WHERE product_id =  ' . $id;
                    $orders = db()->query($sql_order_id);
                    while ($A = db()->fetch_assoc($orders)) {

              Method refresh_modules_list has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function refresh_modules_list($silent = false)
                  {
                      // Cleanup duplicate records
                      $q = db()->query('SELECT name, COUNT(*) AS num FROM ' . db('user_modules') . ' GROUP BY name HAVING num > 1');
                      while ($a = db()->fetch_assoc($q)) {
              Severity: Minor
              Found in plugins/user/admin_modules/yf_user_modules.class.php - About 1 hr to fix

                Method _debug_globals has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _debug_globals(&$params = [])
                    {
                        if ( ! $this->SHOW_GLOBALS) {
                            return '';
                        }
                Severity: Minor
                Found in classes/yf_debug.class.php - About 1 hr to fix

                  Method show_welcome has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function show_welcome()
                      {
                          // For authorized admins only
                          if (MAIN_TYPE_ADMIN) {
                              $login_time = $_SESSION['admin_login_time'];
                  Severity: Minor
                  Found in classes/yf_graphics.class.php - About 1 hr to fix

                    Method _show_filter has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _show_filter()
                        {
                            if (in_array($_GET['action'], ['show', ''])) {
                                $filter_name = $_GET['object'];
                                $r = [

                      Method _hook_side_column has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function _hook_side_column()
                          {
                              if ($_GET['object'] != 'manage_dashboards' || ! in_array($_GET['action'], ['edit', 'add'])) {
                                  return false;
                              }
                      Severity: Minor
                      Found in plugins/dashboards/admin_modules/yf_manage_dashboards.class.php - About 1 hr to fix

                        Method _show_for_lang has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function _show_for_lang($lang)
                            {
                                $_GET['page'] = $lang; // Needed for html()->tree links
                                $all = $this->_get_items($lang);
                                $items = [];
                        Severity: Minor
                        Found in plugins/content/admin_modules/yf_manage_faq.class.php - About 1 hr to fix

                          Method wordwrap has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function wordwrap($str, $width = 75, $break = "\n", $cut = false)
                              {
                                  $splitedArray = [];
                                  $lines = explode("\n", $str);
                                  foreach ((array) $lines as $line) {
                          Severity: Minor
                          Found in classes/yf_utf8.class.php - About 1 hr to fix

                            Method test_union has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function test_union()
                                {
                                    if ($this->_need_skip_test(__FUNCTION__)) {
                                        return;
                                    }

                              Method test_get_deep_array has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function test_get_deep_array()
                                  {
                                      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_accessors_and_mutators has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function test_accessors_and_mutators()
                                    {
                                        return ;
                                        
                                        $model_base = _class('model');
                                Severity: Minor
                                Found in .dev/tests/functional/model/class_model_basic_test.Test.php - About 1 hr to fix

                                  Method test_join has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function test_join()
                                      {
                                          if ($this->_need_skip_test(__FUNCTION__)) {
                                              return;
                                          }

                                    Method test__find_site__complex has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function test__find_site__complex()
                                        {
                                            $func = $this->_get__find_site();
                                            $this->assertEquals(':80', $func([':80'], '', '', 'localhost'));
                                            $this->assertEquals(':80', $func([':80'], '', '', 'test.dev'));
                                    Severity: Minor
                                    Found in .dev/tests/unit/class_main_test.Test.php - About 1 hr to fix

                                      Method test_https_enabled_for has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function test_https_enabled_for()
                                          {
                                              $old1 = main()->HTTPS_ENABLED_FOR;
                                              $old2 = main()->USE_ONLY_HTTPS;
                                      
                                      
                                      Severity: Minor
                                      Found in .dev/tests/rewrite/class_rewrite_testing_shared.php - About 1 hr to fix

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

                                            public function load_predefined_assets($force = false)
                                            {
                                                // Cleanup previously filled assets
                                                if ($force) {
                                                    $this->assets = [];
                                        Severity: Minor
                                        Found in plugins/assets/classes/yf_assets.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language