Showing 3,246 of 4,217 total issues

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

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

                            public function test_check_box()
                            {
                                $html = html();
                                $def_class = $html->CLASS_LABEL_CHECKBOX . ' ' . $html->CLASS_LABEL_CHECKBOX_INLINE;
                        
                        
                        Severity: Minor
                        Found in .dev/tests/unit/class_form_test.Test.php - About 1 hr to fix

                          Function cancel has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  cancel: function( options ) {
                                      var $this = this;
                                      $scope.block_wait     = true;
                                      $scope.is_submitted   = true;
                                      $scope.status         = false;
                          Severity: Minor
                          Found in plugins/content/templates/user/js/ng/payment/balance-recharge.js - About 1 hr to fix

                            Method _sign_liqpay has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                protected function _sign_liqpay()
                                {
                                    $form = '';
                                    $api = _class('payment_api__provider_liqpay');
                                    // test signature
                            Severity: Minor
                            Found in plugins/payment/modules/yf_payment_test.class.php - About 1 hr to fix

                              Method confirmation_ok has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Method api_token_revoke has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function api_token_revoke($options = null)
                                    {
                                        if ( ! $this->ENABLE) {
                                            return  null;
                                        }

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

                                      public function _api_response($options)
                                      {
                                          $operation_id = isset($_GET['operation_id']) ? (int) ($_GET['operation_id']) : '';
                                          $this->payment_api->dump(['name' => ucfirst($this->PROVIDER_NAME), 'operation_id' => $operation_id]);
                                          // import options
                                  Severity: Minor
                                  Found in plugins/payment/classes/yf_payment_api__provider_bitaps.class.php - About 1 hr to fix

                                    Method delete has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function delete($params = [])
                                        {
                                            if (is_string($params)) {
                                                $params = [
                                                    'table' => $params,
                                    Severity: Minor
                                    Found in plugins/sys/classes/yf_admin_methods.class.php - About 1 hr to fix

                                      Method _purse_by_currency has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

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

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

                                            public function _init()
                                            {
                                                require_php_lib('twig');
                                        
                                                // path
                                        Severity: Minor
                                        Found in plugins/tpl/classes/tpl/yf_tpl_driver_twig.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language