Showing 3,246 of 4,217 total issues

Method rename_database has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function rename_database($db_name, $new_name, $extra = [], &$error = false)
    {
        if ( ! strlen($db_name)) {
            $error = 'db_name is empty';
            return false;
Severity: Minor
Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 1 hr to fix

    Method del has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function del($name)
        {
            if ($name === false || $name === null) {
                return null;
            }
    Severity: Minor
    Found in plugins/cache/classes/yf_cache.class.php - About 1 hr to fix

      Method _send_http_status has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function _send_http_status($code = null, $status = null)
          {
              $code = (int) $code;
              $protocol = null;
              $status = null;
      Severity: Minor
      Found in plugins/api/classes/yf_api.class.php - About 1 hr to fix

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

            public function connect($params = [])
            {
                if ($this->_connection) {
                    return $this->_connection;
                }
        Severity: Minor
        Found in plugins/rabbitmq/classes/yf_wrapper_rabbitmq.class.php - About 1 hr to fix

          Method get_user_info has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function get_user_info()
              {
                  $access_token = $this->_storage_get('access_token');
                  if ( ! $access_token) {
                      $access_token = $this->get_access_token();
          Severity: Minor
          Found in plugins/oauth/classes/oauth/yf_oauth_driver_disqus.class.php - About 1 hr to fix

            Method _wrap_style has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _wrap_style($type = 'quote', $extra = '')
                {
                    $used = [
                       'quote' => [
                            'title' => 'QUOTE',
            Severity: Minor
            Found in plugins/common/classes/common/yf_text_highlight.class.php - About 1 hr to fix

              Method _gd_crop has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _gd_crop($source_path, $dest_file_path, $crop_width, $crop_height, $pos_left, $pos_top)
                  {
                      if ( ! extension_loaded('gd')) {
                          return false;
                      }
              Severity: Minor
              Found in plugins/common/classes/common/yf_image_manip.class.php - About 1 hr to fix

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

                    public function _init()
                    {
                        // Set found paths
                        if (empty($this->FOUND_NETPBM_PATH) && defined('NETPBM_PATH') && NETPBM_PATH != '') {
                            $this->FOUND_NETPBM_PATH = NETPBM_PATH;
                Severity: Minor
                Found in plugins/common/classes/common/yf_image_manip.class.php - About 1 hr to fix

                  Method _productparams_container has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function _productparams_container($product_id, $tpl_name = 'productparams_container')
                      {
                          $current_params = [];
                          $current_param_id = 0;
                          if ((int) $product_id != 0) {

                    Method _prepare_express_pdf has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _prepare_express_pdf($items = false)
                        {
                            if (empty($items)) {
                                return false;
                            }

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

                          public function _show_filter()
                          {
                              $filters = [
                                  'show' => function ($filter_name, $replace) {
                                      $fields = ['id', 'add_date', 'action', 'item_id', 'ip', 'user_id'];
                      Severity: Minor
                      Found in plugins/shop/admin_modules/yf_manage_shop_revisions.class.php - About 1 hr to fix

                        Method checkout_order_revision has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function checkout_order_revision()
                            {
                                $_GET['id'] = (int) ($_GET['id']);
                                $revision_data = db()->get('SELECT * FROM ' . db('shop_order_revisions') . ' WHERE id=' . $_GET['id']);
                                if (empty($revision_data)) {

                          Method _site_map_items has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function _site_map_items($sm_obj)
                              {
                                  if ( ! is_object($sm_obj)) {
                                      return false;
                                  }
                          Severity: Minor
                          Found in plugins/shop/modules/shop/yf_shop__site_map_items.class.php - About 1 hr to fix

                            Method _recursive_sort_items has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function _recursive_sort_items($items = [], $skip_item_id = 0, $parent_id = 0)
                                {
                                    $children = [];
                                    $cur_group = MAIN_TYPE_USER ? $_SESSION['user_group'] : $_SESSION['admin_group'];
                                    foreach ((array) $items as $id => $info) {
                            Severity: Minor
                            Found in plugins/categories/classes/yf_cats.class.php - About 1 hr to fix

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

                                  public function _init()
                                  {
                                      if ($this->USE_LOCKING) {
                                          $this->LOCK_FILE_NAME = STORAGE_PATH . $this->LOCK_FILE_NAME;
                                      }
                              Severity: Minor
                              Found in plugins/site_map/modules/yf_site_map.class.php - About 1 hr to fix

                                Method chown has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function chown($server_info = [], $path = '', $new_owner = '', $new_group = '', $recursively = false)
                                    {
                                        if (is_array($path)) {
                                            $_bulk_cmd = [];
                                            foreach ((array) $path as $_path => $_new_owner) {
                                Severity: Minor
                                Found in plugins/ssh/classes/ssh/yf_ssh_files.class.php - About 1 hr to fix

                                  Method _options_container has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function _options_container($info = [], $saved = [], $ds = [])
                                      {
                                          $for_section = $ds['type'] == 'user' ? 'user' : 'admin';
                                  
                                          $a = [];
                                  Severity: Minor
                                  Found in plugins/dashboards/admin_modules/yf_manage_dashboards.class.php - About 1 hr to fix

                                    Method _options_container has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function _options_container($info = [], $saved = [], $ds = [])
                                        {
                                            $for_section = $ds['type'] == 'user' ? 'user' : 'admin';
                                    
                                            $a = [];
                                    Severity: Minor
                                    Found in plugins/dashboards/admin_modules/yf_manage_dashboards2.class.php - About 1 hr to fix

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

                                          public function add()
                                          {
                                              $a['locale'] = substr($_GET['page'], 0, 2) ?: 'ru';
                                              $a['parent_id'] = (int) $_GET['id'];
                                              $parent = $a['parent_id'] ? (array) from(self::table)->whereid($a['parent_id'])->get() : [];
                                      Severity: Minor
                                      Found in plugins/content/admin_modules/yf_manage_faq.class.php - About 1 hr to fix

                                        Method view has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function view()
                                            {
                                                $ds = $this->_get_dashboard_data($_GET['id']);
                                        
                                                if ( ! $ds['id']) {
                                        Severity: Minor
                                        Found in plugins/dashboards/admin_modules/yf_manage_dashboards2.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language