Showing 3,246 of 4,217 total issues

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

function scan_dir($start_dir, $FLAT_MODE = true, $include_pattern = '', $exclude_pattern = '')
{
    if ( ! file_exists($start_dir)) {
        return false;
    }
Severity: Minor
Found in .dev/useful/pack_zend.php - About 1 hr to fix

    Method div_box has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function div_box($name, $values = [], $selected = '', $extra = [])
        {
            if (is_array($name)) {
                $extra = (array) $extra + $name;
                $name = $extra['name'];
    Severity: Minor
    Found in plugins/html/classes/yf_html.class.php - About 1 hr to fix

      Method _preload_data has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function _preload_data()
          {
              if ($this->_preload_complete) {
                  return true;
              }
      Severity: Minor
      Found in plugins/locale/admin_modules/yf_locale_editor.class.php - About 1 hr to fix

        Method options_to_str has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function options_to_str(array $options, $is_request = true, $level = 1)
            {
                if ($level > $this->options_level_max) {
                    return  null;
                }
        Severity: Minor
        Found in plugins/payment/classes/payment_provider/ecommpay/EcommPay.php - About 1 hr to fix

          Method edit has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function edit()
              {
                  $id = (int) ($_GET['id']);
                  if ( ! $id) {
                      return js_redirect(url('/@object'), false, 'Empty ID');
          Severity: Minor
          Found in plugins/sys/admin_modules/yf_manage_cron.class.php - About 1 hr to fix

            Method add_rule has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function add_rule()
                {
                    $block_info = db()->query_fetch('SELECT * FROM ' . db('blocks') . ' WHERE id=' . (int) ($_GET['id']));
                    if (empty($block_info['id'])) {
                        return _e('No such block!');
            Severity: Minor
            Found in plugins/sys/admin_modules/yf_blocks.class.php - About 1 hr to fix

              Method _get_compiled_string has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _get_compiled_string($name, $replace = [], $params = [])
                  {
                      $compiled_string = null;
                      // TODO: add ability to use memcached or other fast cache-oriented storage instead of files => lower disk IO
                      $compiled_storage = 'files';
              Severity: Minor
              Found in plugins/tpl/classes/tpl/yf_tpl_driver_yf.class.php - About 1 hr to fix

                Method _validate_prepare has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _validate_prepare($validate_rules = [], $extra = [])
                    {
                        $form_global_validate = isset($this->_params['validate']) ? $this->_params['validate'] : (isset($this->_replace['validate']) ? $this->_replace['validate'] : []);
                        foreach ((array) $form_global_validate as $name => $rules) {
                            $this->_validate_rules[$name] = $rules;
                Severity: Minor
                Found in plugins/form2/classes/yf_form2.class.php - About 1 hr to fix

                  Method list_keys has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function list_keys()
                      {
                          $do_real_work = true;
                          if ( ! $this->_driver_ok) {
                              $do_real_work = false;
                  Severity: Minor
                  Found in plugins/cache/classes/yf_cache.class.php - About 1 hr to fix

                    Method query_fetch has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Method connect has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function connect()
                          {
                              $dsn = 'mysql:host=' . $this->params['host'];
                              if ($this->params['port'] && $this->params['port'] != $this->DEF_PORT) {
                                  $dsn .= ';port=' . $this->params['port'];
                      Severity: Minor
                      Found in plugins/db/classes/db/yf_db_driver_pdo_mysql.class.php - About 1 hr to fix

                        Method _load_oauth_providers has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function _load_oauth_providers()
                            {
                                $config = $this->_load_oauth_config();
                                if (isset($this->_providers_loaded)) {
                                    return $this->_providers;
                        Severity: Minor
                        Found in plugins/oauth/classes/yf_oauth.class.php - About 1 hr to fix

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

                              public function go($text = '')
                              {
                                  $cur_page_md5 = md5($_GET['object'] . '%%' . $_GET['action'] . '%%' . $_GET['id']);
                                  // Verify and send email
                                  if ( ! empty($_POST['go'])) {
                          Severity: Minor
                          Found in plugins/common/classes/common/yf_email_page.class.php - About 1 hr to fix

                            Method clear_pattern_child_process has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function clear_pattern_child_process()
                                {
                                    if ( ! isset($_GET['id']) && (int) ($_GET['id'])) {
                                        return t('Empty clear pattern ID');
                                    }

                              Method add_item has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Method add has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function add()
                                    {
                                        $a = $_POST;
                                        if ((int) ($_GET['receiver_id']) != 0) {
                                            $a['receiver_id'] = $_GET['receiver_id'];

                                  Method edit has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function edit()
                                      {
                                          $ds = $this->_get_dashboard_data($_GET['id']);
                                          if ( ! $ds['id']) {
                                              return _e('No such record');
                                  Severity: Minor
                                  Found in plugins/dashboards/admin_modules/yf_manage_dashboards.class.php - About 1 hr to fix

                                    Method quick_menu has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function quick_menu()
                                        {
                                            if ( ! $this->QUICK_MENU_ENABLED
                                                || (MAIN_TYPE_USER && ( ! isset($_SESSION['user_id']) || ! $_SESSION['user_id']))
                                                || (MAIN_TYPE_ADMIN && ( ! isset($_SESSION['admin_id']) || ! $_SESSION['admin_id']))
                                    Severity: Minor
                                    Found in classes/yf_graphics.class.php - About 1 hr to fix

                                      Method _preload_plugins_list has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function _preload_plugins_list($force = false)
                                          {
                                              $this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
                                              if (isset($this->_plugins) && ! $force) {
                                                  return $this->_plugins;
                                      Severity: Minor
                                      Found in classes/yf_main.class.php - About 1 hr to fix

                                        Method test_basic_queries_and_fetching has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function test_basic_queries_and_fetching()
                                            {
                                                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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language