Showing 3,246 of 4,217 total issues

Method _upload_item__import has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function _upload_item__import($options)
    {
        $_ = $options;
        $id = $_['id'];
        $upload_list = $this->upload_list;

    Method _debug_redis has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Method init_class has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function init_class($class_name, $custom_path = '', $params = '')
          {
              $class_name = $this->get_class_name($class_name);
              if (isset($this->modules[$class_name]) && is_object($this->modules[$class_name])) {
                  return $this->modules[$class_name];
      Severity: Minor
      Found in classes/yf_main.class.php - About 1 hr to fix

        Method _connect has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _connect()
            {
                if (isset($this->sphinx_connection)) {
                    return $this->sphinx_connection;
                }
        Severity: Minor
        Found in plugins/search/classes/yf_sphinxsearch.class.php - About 1 hr to fix

          Method test_yf_db_installer_basic has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method create_tables has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function create_tables()
                {
            try {
                    self::utils()->create_table('bears', function ($t) {
                        $t->increments('id')
            Severity: Minor
            Found in .dev/tests/functional/model/class_model_bears_test.Test.php - About 1 hr to fix

              Method test_complex has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function test_complex()
                  {
                      $data = [
                          'a_variable' => 'var_value',
                          'navigation' => [
              Severity: Minor
              Found in .dev/tests/unit/tpl/tpl_driver_yf_test.Test.php - About 1 hr to fix

                Method send_mail has 13 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function send_mail($email_from, $name_from = '', $email_to = '', $name_to = '', $subject = '', $text = '', $html = '', $attaches = [], $charset = '', $old_param1 = '', $force_mta_opts = [], $priority = null, $smtp = [])
                Severity: Major
                Found in plugins/common/classes/yf_common.class.php - About 1 hr to fix

                  Method _on_validate_ok has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function _on_validate_ok($params = [], $form)
                      {
                          $p = $params ?: $_POST;
                          $lang = $p['lang'];
                          $to_export = [];

                    Method _url_control has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _url_control()
                        {
                            if ( ! $this->ALLOW_URL_CONTROL) {
                                return false;
                            }
                    Severity: Minor
                    Found in plugins/assets/classes/yf_assets.class.php - About 1 hr to fix

                      Function payout_provider_change has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $scope.payout_provider_change = function( $event, provider_id, method_id ) {
                              $event.stopPropagation();
                              var action = $scope.action.payout;
                              if( action.provider_id == provider_id && action.method_id == method_id ) {
                                  $scope.payout_provider_init();
                      Severity: Minor
                      Found in plugins/content/templates/user/js/ng/payment/balance-recharge.js - About 1 hr to fix

                        Method load_rate has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function load_rate($options = null)
                            {
                                // import options
                                is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                // var
                        Severity: Minor
                        Found in plugins/payment/classes/yf_payment_api__currency.class.php - About 1 hr to fix

                          Method find_all_hooks has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function find_all_hooks($section = 'all')
                              {
                                  if ( ! in_array($section, ['all', 'user', 'admin'])) {
                                      $section = 'all';
                                  }
                          Severity: Minor
                          Found in plugins/sys/classes/yf_admin_methods.class.php - About 1 hr to fix

                            Method _show_themes has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function _show_themes()
                                {
                                    $themes = $this->_get_themes();
                            
                                    $num_stpls_array = cache_get($this->CACHE_NAME, 60);
                            Severity: Minor
                            Found in plugins/tpl/admin_modules/yf_template_editor.class.php - About 1 hr to fix

                              Method _process_where_cond has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function _process_where_cond($left, $op, $right)
                                  {
                                      ! $op && $op = '=';
                                      $left = trim(strtolower($left));
                                      if (is_string($op)) {
                              Severity: Minor
                              Found in plugins/db/classes/db/yf_db_query_builder_driver.class.php - About 1 hr to fix

                                Method _init has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function _init()
                                    {
                                        ini_set('html_errors', 0);
                                        // ob_start();
                                        $class = &$this->class;
                                Severity: Minor
                                Found in plugins/api/classes/yf_api.class.php - About 1 hr to fix

                                  Method add_watermark has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function add_watermark($source_img_path, $watermark_path)
                                      {
                                          $img_info = getimagesize($source_img_path);
                                          $source_mime_type = $this->ALLOWED_MIME_TYPES[$img_info['mime']];
                                          if ( ! $source_mime_type) {
                                  Severity: Minor
                                  Found in plugins/common/classes/common/yf_make_thumb.class.php - About 1 hr to fix

                                    Method coupon_add has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function coupon_add()
                                        {
                                            if (main()->is_post()) {
                                                if ( ! $_POST['code']) {
                                                    _re('Code must be entered');

                                      Method get_data has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function get_data($name = '', $force_ttl = 0, $params = [])
                                          {
                                              DEBUG_MODE && $time_start = microtime(true);
                                              if (empty($name)) {
                                                  return null;
                                      Severity: Minor
                                      Found in classes/yf_main.class.php - About 1 hr to fix

                                        Method test_validate_post_empty_value has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function test_validate_post_empty_value()
                                            {
                                                $_SERVER['REQUEST_METHOD'] = 'POST';
                                                $params = ['do_not_remove_errors' => 1];
                                        
                                        
                                        Severity: Minor
                                        Found in .dev/tests/functional/class_form_real_test.Test.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language