Showing 3,246 of 4,217 total issues

File yf_pcntl_signal.class.php has 274 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * pcntl_signal handler
 * static class.
Severity: Minor
Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 2 hrs to fix

    File yf_common_num2string.class.php has 274 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    
    class yf_common_num2string
    {
    Severity: Minor
    Found in plugins/common/classes/common/yf_common_num2string.class.php - About 2 hrs to fix

      Method select_box has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function select_box($name, $values = [], $selected = '', $show_text = false, $type = 2, $add_str = '', $translate = 0, $level = 0)
          {
              // Passing params as array
              if (is_array($name)) {
                  $extra = (array) $extra + $name;
      Severity: Major
      Found in plugins/html/classes/yf_html.class.php - About 2 hrs to fix

        Method balance has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function balance($options)
            {
                if (empty(main()->USER_ID)) {
                    js_redirect('/login_form', false, 'User id empty');
                }
        Severity: Major
        Found in plugins/payment/modules/yf_payment/yf_payment__user.class.php - About 2 hrs to fix

          Method authorize_request has 64 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method _api_authorize has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method _update_status has 64 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _update_status($options = null)
                  {
                      if ( ! $this->ENABLE) {
                          return  null;
                      }
              Severity: Major
              Found in plugins/payment/classes/yf_payment_api__provider_remote.class.php - About 2 hrs to fix

                Method _replace_std_patterns has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _replace_std_patterns($string, $name = '', array &$replace, $params = [])
                    {
                        $_this = $this;
                        $tpl = tpl();
                
                
                Severity: Major
                Found in plugins/tpl/classes/tpl/yf_tpl_driver_yf.class.php - About 2 hrs to fix

                  Method table_get_columns has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function table_get_columns($table, $extra = [], &$error = false)
                      {
                          if (is_array($table)) {
                              $extra = (array) $extra + $table;
                              $table = '';
                  Severity: Major
                  Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 2 hrs to fix

                    Method allow has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function allow()
                        {
                            if ( ! $this->LOGGING || MAIN_TYPE_ADMIN) {
                                return false;
                            }
                    Severity: Major
                    Found in plugins/logs/classes/logs/yf_logs_exec_user.class.php - About 2 hrs to fix

                      Method _data has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function _data()
                          {
                              $_class_price = $this->_class_price;
                              // init sql
                              $sql_table = db('shop_products');

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

                            public function go()
                            {
                                if ($this->DEBUG_CONSOLE_HIDDEN) {
                                    return false;
                                }
                        Severity: Major
                        Found in classes/yf_debug.class.php - About 2 hrs to fix

                          Method test_rewrite_replace_links has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function test_rewrite_replace_links()
                              {
                                  $GLOBALS['PROJECT_CONF']['tpl']['REWRITE_MODE'] = true;
                                  $host = self::$host;
                          
                          
                          Severity: Major
                          Found in .dev/tests/rewrite/class_rewrite_testing_shared.php - About 2 hrs to fix

                            File advertising.sql_php.php has 273 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            
                            return [
                                'fields' => [
                                    'id' => [
                            Severity: Minor
                            Found in plugins/sys/share/db/sql_php/advertising.sql_php.php - About 2 hrs to fix

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

                                  public function _on_validate_ok($params = [], $form = null)
                                  {
                                      $p = $params ?: $_POST;
                              
                                      // TODO: named cleanups and separate stats by them

                                Method _add_panel has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    protected function _add_panel($options)
                                    {
                                        static $count = 1;
                                        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                        // action
                                Severity: Major
                                Found in plugins/payment/modules/yf_payment_test.class.php - About 2 hrs to fix

                                  Method join has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function join($table, $on, $join_type = '', $is_select = false)
                                      {
                                          $join_types = [
                                              'left',
                                              'right',
                                  Severity: Major
                                  Found in plugins/db/classes/db/yf_db_query_builder_driver.class.php - About 2 hrs to fix

                                    Method remote_file_size has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function remote_file_size($url = '')
                                        {
                                            $url = $this->_fix_url($url);
                                            $tmp = @parse_url($url);
                                            $sch = $tmp['scheme'];
                                    Severity: Major
                                    Found in plugins/common/classes/common/yf_remote_files.class.php - About 2 hrs to fix

                                      Method num2str has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function num2str($float, $currency_id = null, $lang_id = null, $set = false)
                                          {
                                              $lang_id = $this->lang_id($lang_id, $set);
                                              $currency_id = $this->currency_id($currency_id, $set);
                                              $words = &$this->words[$lang_id];
                                      Severity: Major
                                      Found in plugins/common/classes/common/yf_common_num2string.class.php - About 2 hrs to fix

                                        Method novaposhta_ua__import_old has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function novaposhta_ua__import_old()
                                            {
                                                // get data
                                                // $file = '/tmp/warenhouses_ru.xls';
                                                // $content = file_get_contents( $file );
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language