Showing 3,246 of 4,217 total issues

Method _filter_sql_prepare has 110 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function _filter_sql_prepare($filter_data = [], $filter_params = [], $__sql = '', $table = null)
    {
        if ( ! $filter_data) {
            return '';
        }
Severity: Major
Found in plugins/table2/classes/table2/yf_table2_filter.class.php - About 4 hrs to fix

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

    <?php
    
    /**
     * Crop & rotate images.
     *
    Severity: Minor
    Found in plugins/common/classes/common/yf_image_manip.class.php - About 4 hrs to fix

      Method _process_foreaches has 109 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function _process_foreaches($string = '', $replace = [], $stpl_name = '')
          {
              if (false === strpos($string, '{/foreach') || empty($string)) {
                  return $string;
              }
      Severity: Major
      Found in plugins/tpl/classes/tpl/yf_tpl_driver_yf.class.php - About 4 hrs to fix

        Method alternate_remote_file_size has 109 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function alternate_remote_file_size($url, $retry = 3)
            {
                $method = 'GET';
        
                $time_start = microtime(true);
        Severity: Major
        Found in plugins/common/classes/common/yf_remote_files.class.php - About 4 hrs to fix

          Method _db_import has 109 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function _db_import($options, $test)
              {
                  $_ = $options;
                  $id = $_['id'];
                  $fields = $_['fields'];

            yf_docs has 34 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class yf_docs
            {
                private $whats_new = [
                    'demo',
                ];
            Severity: Minor
            Found in plugins/docs/modules/yf_docs.class.php - About 4 hrs to fix

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

              <?php
              
              /**
               * Templates handling class.
               *
              Severity: Minor
              Found in plugins/tpl/admin_modules/yf_template_editor.class.php - About 4 hrs to fix

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

                    public function add($content, $asset_type = 'bundle', $content_type_hint = 'auto', $params = [])
                    {
                        if (DEBUG_MODE) {
                            $trace = main()->trace_string();
                        }
                Severity: Major
                Found in plugins/assets/classes/yf_assets.class.php - About 4 hrs to fix

                  Method mail has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function mail()
                      {
                          $mail_tpl = [
                              'payin_success' => [
                                  'type' => 'payin',
                  Severity: Major
                  Found in plugins/payment/modules/yf_payment_test.class.php - About 4 hrs to fix

                    Method _show_menu has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _show_menu($params = [])
                        {
                            $return_array = isset($params['return_array']) ? $params['return_array'] : false;
                            $force_stpl_name = isset($params['force_stpl_name']) ? $params['force_stpl_name'] : false;
                            $menu_name = $params['name'];
                    Severity: Major
                    Found in plugins/sys/classes/yf_core_menu.class.php - About 4 hrs to fix

                      Method init_graphics has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function init_graphics()
                          {
                              $init_type = MAIN_TYPE;
                              // Do not remove this!
                              $this->_init_global_tags();
                      Severity: Major
                      Found in plugins/tpl/classes/yf_tpl.class.php - About 4 hrs to fix

                        Method _order_pay_authorize_net has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function _order_pay_authorize_net($params = [])
                            {
                                $order_info = $params['order_info'];
                                $params = $params['params'];
                        
                        
                        Severity: Major
                        Found in plugins/shop/modules/shop/yf_shop__order_pay_authorize_net.class.php - About 4 hrs to fix

                          Function operation has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function operation($options = null)
                              {
                                  $_ = &$options;
                                  $is_no_count = &$_['no_count'];
                                  $is_sql = &$_['sql'];
                          Severity: Minor
                          Found in plugins/payment/classes/yf_payment_api.class.php - About 4 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function _get_users_daily_payments has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function _get_users_daily_payments($user_ids = [], $type = 'sum')
                              {
                                  if ( ! $user_ids) {
                                      return false;
                                  }
                          Severity: Minor
                          Found in plugins/payment/admin_modules/yf_manage_payment.class.php - About 4 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function _pcntl_dispatch has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public static function _pcntl_dispatch($options = null)
                              {
                                  $result = false;
                                  // import options
                                  is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                          Severity: Minor
                          Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 4 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function from has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function from()
                              {
                                  $sql = '';
                                  $tables = func_get_args();
                                  if ( ! count((array) $tables)) {
                          Severity: Minor
                          Found in plugins/db/classes/db/yf_db_query_builder_driver.class.php - About 4 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function table_get_columns has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

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

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function create_table has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function create_table($table, $extra = [], &$error = false)
                              {
                                  // Example callable: create_table($name, function($t) { $t->int('id', 10); });
                                  if (is_callable($extra)) {
                                      if (strpos($table, '.') !== false) {
                          Severity: Minor
                          Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 4 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function multi_get has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function multi_get($names = [], $force_ttl = 0, $params = [])
                              {
                                  $do_real_work = true;
                                  if ( ! $this->_driver_ok || $this->NO_CACHE) {
                                      $do_real_work = false;
                          Severity: Minor
                          Found in plugins/cache/classes/yf_cache.class.php - About 4 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function connect has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function connect($server_info = [])
                              {
                                  if ( ! $this->_INIT_OK || ! $server_info) {
                                      return false;
                                  }
                          Severity: Minor
                          Found in plugins/ssh/classes/yf_ssh.class.php - About 4 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language