Showing 3,246 of 4,217 total issues

Method test_correct_protocol has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_correct_protocol()
    {
        $old = main()->USE_ONLY_HTTPS;
        main()->USE_ONLY_HTTPS = true;

Severity: Minor
Found in .dev/tests/rewrite/class_rewrite_testing_shared.php - About 1 hr to fix

    Method _filter_form_show has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function _filter_form_show($filter, $replace)
        {
            $order_fields = [];
            foreach (explode('|', 'user_id|name|email|add_date|last_login|num_logins|active|balance|datetime_create|datetime_update') as $f) {
                $order_fields[$f] = $f;
    Severity: Minor
    Found in plugins/payment/admin_modules/yf_manage_payment.class.php - About 1 hr to fix

      Method mass_cancel has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function mass_cancel($options = null)
          {
              $operation_id = $this->_get_operation_id($options);
              is_numeric($operation_id) && $operation_id = [$operation_id => 1];
              if ( ! is_array($operation_id)) {
      Severity: Minor
      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

        Method _get_stpls_for_type has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _get_stpls_for_type($type = 'user')
            {
                $theme_name = $type == 'admin' ? 'admin' : 'user';
        
                $CACHE_NAME = 'stpls_list_for_' . $type;
        Severity: Minor
        Found in plugins/tpl/admin_modules/yf_template_editor.class.php - About 1 hr to fix

          Method _check_multi_accounts has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _check_multi_accounts()
              {
                  if (empty($_SESSION[$this->VAR_USER_ID]) || empty($_SESSION[$this->VAR_USER_GROUP_ID])) {
                      return false;
                  }
          Severity: Minor
          Found in plugins/auth/classes/auth/yf_auth_user.class.php - About 1 hr to fix

            Method tbl_link_active has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function tbl_link_active($name = '', $link = '', $extra = [], $replace = [], $form)
                {
                    if (is_array($name)) {
                        $extra = (array) $extra + $name;
                        $name = $extra['name'];
            Severity: Minor
            Found in plugins/form2/classes/form2/yf_form2_tbl_funcs.class.php - About 1 hr to fix

              Method alter_table has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function alter_table($table_name, $column_name, $db)
                  {
                      if ( ! $this->get_lock()) {
                          return false;
                      }
              Severity: Minor
              Found in plugins/db/classes/db/yf_db_installer.class.php - About 1 hr to fix

                Method _render_table_contents_rotated has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _render_table_contents_rotated($data = [], $params, $to_hide = [])
                    {
                        $tbody_attrs = '';
                        if (isset($params['tbody'])) {
                            $tbody_attrs = is_array($params['tbody']) ? _attrs($params['tbody'], ['class', 'id']) : ' ' . $params['tbody'];
                Severity: Minor
                Found in plugins/table2/classes/yf_table2.class.php - About 1 hr to fix

                  Method load_spiders_uas has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function load_spiders_uas()
                      {
                          $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 get_relative_path has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function get_relative_path($target, $fromdir)
                        {
                            // Check that the fromdir has a trailing slash, otherwise realpath will
                            // strip the last directory name off
                            if (($fromdir[strlen($fromdir) - 1] != '\\') && ($fromdir[strlen($fromdir) - 1] != '/')) {
                    Severity: Minor
                    Found in plugins/common/classes/common/yf_other_common.class.php - About 1 hr to fix

                      Method products_xls_export has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function products_xls_export()
                          {
                              $old_supplier_id = '';
                              ini_set('memory_limit', '1024M');
                              $sql = $this->_sql();

                        Method set_main_image has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function set_main_image()
                            {
                                if ($_GET['id']) {
                                    $product = module('manage_shop')->_product_get_info($_GET['id']);
                                }

                          Method _db_exists has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function _db_exists($name, $options = [])
                              {
                                  $cache = &$this->cache;
                                  $_ = $options;
                                  $key = $_['key'];

                            Method _local_make_tar has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function _local_make_tar($files_list = [], $archive_path = '')
                                {
                                    if (empty($files_list)) {
                                        return false;
                                    }
                            Severity: Minor
                            Found in plugins/ssh/classes/ssh/yf_ssh_tar.class.php - About 1 hr to fix

                              Method edit_locale_stpl has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function edit_locale_stpl()
                                  {
                                      no_graphics(true);
                                      if ( ! DEBUG_MODE || ! tpl()->ALLOW_INLINE_DEBUG) {
                                          return print 'Access denied';
                              Severity: Minor
                              Found in plugins/dynamic/modules/dynamic/yf_dynamic_edit.class.php - About 1 hr to fix

                                Method _get_modules_from_files has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function _get_modules_from_files($include_framework = true, $with_sub_modules = false)
                                    {
                                        $modules = [];
                                
                                        $yf_prefix_len = strlen(YF_PREFIX);
                                Severity: Minor
                                Found in plugins/user/admin_modules/yf_user_modules.class.php - About 1 hr to fix

                                  Method category_revisions_view has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function category_revisions_view()
                                      {
                                          $type = 'category';
                                          $db_revision = $this->get_revision_db($type);
                                          $id = (int) $_GET['id'];

                                    Method download_dir has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function download_dir($server_info = [], $remote_dir = '', $local_dir = '', $pattern_include = '', $pattern_exclude = '', $level = null)
                                        {
                                            $local_dir = _class('ssh')->_prepare_path($local_dir);
                                            $remote_dir = _class('ssh')->_prepare_path($remote_dir);
                                            if ( ! _class('ssh')->_INIT_OK || ! $server_info || ! strlen($local_dir) || ! strlen($remote_dir)) {
                                    Severity: Minor
                                    Found in plugins/ssh/classes/ssh/yf_ssh_files.class.php - About 1 hr to fix

                                      Method show_site_title has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function show_site_title()
                                          {
                                              if (defined('SITE_ADVERT_NAME')) {
                                                  $title = SITE_ADVERT_NAME;
                                              }
                                      Severity: Minor
                                      Found in classes/yf_graphics.class.php - About 1 hr to fix

                                        Method test_one_to_one has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function test_one_to_one()
                                            {
                                                if ($this->_need_skip_test(__FUNCTION__)) {
                                                    return;
                                                }
                                        Severity: Minor
                                        Found in .dev/tests/functional/model/class_model_bears_test.Test.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language