Showing 4,217 of 4,217 total issues

Method get_asset has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function get_asset($name, $asset_type, $version = '')
    {
        if ( ! $name) {
            return null;
        }
Severity: Minor
Found in plugins/assets/classes/yf_assets.class.php - About 1 hr to fix

    Method _api_response has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Method _form has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function _form($data, $options = null)
          {
              if ( ! $this->ENABLE) {
                  return  null;
              }
      Severity: Minor
      Found in plugins/payment/classes/yf_payment_api__provider_ecommpay.class.php - About 1 hr to fix

        Method check_all_interkassa has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function check_all_interkassa($options = null)
            {
                // command line interface
                $is_cli = (php_sapi_name() == 'cli');
                $is_cli && $this->_check_all_interkassa_cli();
        Severity: Minor
        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

          Method _api_provider has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _api_provider($request, $options)
              {
                  $api = _class('api');
                  $payment_api = _class('payment_api');
                  $provider_name = $_GET['name'];
          Severity: Minor
          Found in plugins/payment/modules/yf_payment.class.php - About 1 hr to fix

            Method copy_item2 has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function copy_item2()
                {
                    if ($_POST['items_to_copy']) {
                        $items = unserialize(urldecode($_POST['items_to_copy']));
                        foreach ((array) $items as $k => $v) {
            Severity: Minor
            Found in plugins/sys/admin_modules/yf_file_manager.class.php - About 1 hr to fix

              Method show_items has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function show_items()
                  {
                      $menu_info = db()->query_fetch('SELECT * FROM ' . db('menus') . ' WHERE id=' . (int) ($_GET['id']) . ' OR name="' . db()->es($_GET['id']) . '"');
                      if (empty($menu_info)) {
                          return _e('No such menu!');
              Severity: Minor
              Found in plugins/sys/admin_modules/yf_menus_editor.class.php - About 1 hr to fix

                Method _cleanup_menu_items has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _cleanup_menu_items($menu_items = [])
                    {
                        $center_block_id = _class('graphics')->_get_center_block_id();
                
                        $out = [];
                Severity: Minor
                Found in plugins/sys/classes/yf_core_menu.class.php - About 1 hr to fix

                  Method _load_tables_sql_php_from_files has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function _load_tables_sql_php_from_files($params = [])
                      {
                          $existing_files_sql_php = [];
                          $existing_sql_php = [];
                          // Preload db installer PHP array of CREATE TABLE DDL statements
                  Severity: Minor
                  Found in plugins/db/classes/db/yf_db_migrator.class.php - About 1 hr to fix

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

                        public function edit()
                        {
                            $id = (int) ($_GET['id']);
                            if ( ! $id) {
                                return _e('Wrong id');
                    Severity: Minor
                    Found in plugins/admin/admin_modules/yf_admin.class.php - About 1 hr to fix

                      Method create_table has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function create_table($table_name, $db)
                          {
                              $table_found = false;
                              if (empty($table_name)) {
                                  return false;
                      Severity: Minor
                      Found in plugins/db/classes/db/yf_db_installer.class.php - About 1 hr to fix

                        Method _get_modules_from_files has 43 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/admin/admin_modules/yf_admin_modules.class.php - About 1 hr to fix

                          Method _get_update_batch_sql has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function _get_update_batch_sql($table, $values, $index)
                              {
                                  $ids = [];
                                  $final = [];
                                  $where = [];
                          Severity: Minor
                          Found in plugins/db/classes/db/yf_db_query_builder_driver.class.php - About 1 hr to fix

                            Method mkdir_m has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function mkdir_m($server_info = [], $dir_name = '', $dir_mode = 755, $create_index_htmls/*!not implemented here!*/ = 0, $start_folder = '/')
                                {
                                    if ( ! _class('ssh')->_INIT_OK || ! $server_info) {
                                        return false;
                                    }
                            Severity: Minor
                            Found in plugins/ssh/classes/ssh/yf_ssh_files.class.php - About 1 hr to fix

                              Method _get_items_array has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function _get_items_array($cat_name = '', $recursive_sort = true, $all = false)
                                  {
                                      if (empty($cat_name)) {
                                          $cat_name = $this->_default_cats_block;
                                      }
                              Severity: Minor
                              Found in plugins/categories/classes/yf_cats.class.php - About 1 hr to fix

                                Method jquery_sparklines has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function jquery_sparklines($data, $extra = [])
                                    {
                                        $extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
                                        if ( ! is_array($data) || ! $data) {
                                            return false;
                                Severity: Minor
                                Found in plugins/charts/classes/yf_charts.class.php - About 1 hr to fix

                                  Method test_insert_if_ok has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function test_insert_if_ok()
                                      {
                                          $this->assertFalse((bool) self::utils()->table_exists('static_pages'));
                                          $this->assertEmpty(self::db()->from('static_pages')->get());
                                          $this->assertTrue((bool) self::utils()->table_exists('static_pages'));
                                  Severity: Minor
                                  Found in .dev/tests/functional/class_form_real_test.Test.php - About 1 hr to fix

                                    Method test_yf_db_installer_alter_table has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function test_yf_db_installer_alter_table()
                                        {
                                            $bak['ERROR_AUTO_REPAIR'] = self::db()->ERROR_AUTO_REPAIR;
                                            self::db()->ERROR_AUTO_REPAIR = true;
                                    
                                    

                                      Method test_btn_link has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function test_btn_link()
                                          {
                                              $a = [
                                                  ['id' => '1', 'user_id' => '122', 'product_id' => '133'],
                                                  ['id' => '2', 'user_id' => '222', 'product_id' => '233'],
                                      Severity: Minor
                                      Found in .dev/tests/unit/class_table_test.Test.php - About 1 hr to fix

                                        Method test_where_simplified_syntax has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

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