Showing 4,217 of 4,217 total issues

Method split_sql has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function split_sql($sql)
    {
        $out = [];
        // do not trim
        $sql = rtrim($sql, "\n\r");
Severity: Major
Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 2 hrs to fix

    Method query has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function &query($sql)
        {
            if ( ! $this->_connected && ! $this->connect()) {
                return false;
            }
    Severity: Major
    Found in plugins/db/classes/yf_db.class.php - About 2 hrs to fix

      Method show_old has 74 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function show_old()
          {
              // Path to project.conf.php
              $proj_conf_path = INCLUDE_PATH . 'project_conf.php';
      
      
      Severity: Major
      Found in plugins/admin_home/admin_modules/yf_admin_home.class.php - About 2 hrs to fix

        Method _add_revision has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _add_revision($type, $action, $ids = false)
            {
                if (empty($ids) || empty($action) || empty($type)) {
                    return false;
                }

          Method _store_item has 74 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _store_item($data = [])
              {
                  if (is_string($data) && strlen($data)) {
                      $data = ['url' => $data];
                  }
          Severity: Major
          Found in plugins/site_map/modules/yf_site_map.class.php - About 2 hrs to fix

            Method search_used has 73 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function search_used()
                {
                    $exclude_paths = [
                        '*/.git/*',
                        '*/.dev/*',
            Severity: Major
            Found in plugins/assets/admin_modules/yf_manage_assets.class.php - About 2 hrs to fix

              Method _show_block has 73 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _show_block($input = [])
                  {
                      if ( ! isset($this->_blocks_infos)) {
                          $this->_blocks_infos = main()->get_data('blocks_all');
                      }
              Severity: Major
              Found in plugins/sys/classes/yf_core_blocks.class.php - About 2 hrs to fix

                Method _get_methods has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _get_methods($params = [])
                    {
                        $ONLY_PRIVATE_METHODS = [];
                        if (isset($params['private'])) {
                            $ONLY_PRIVATE_METHODS = $params['private'];
                Severity: Major
                Found in plugins/sys/classes/core_api/yf_core_api_admin_modules.class.php - About 2 hrs to fix

                  Method generate_down has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function generate_down($report = null, $params = [])
                      {
                          if ( ! isset($report)) {
                              $report = $this->compare($params);
                          }
                  Severity: Major
                  Found in plugins/db/classes/db/yf_db_migrator.class.php - About 2 hrs to fix

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

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

                      Method data_get_latest_currencies has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function data_get_latest_currencies()
                      {
                          $url = 'http://www.currency-iso.org/dam/downloads/table_a1.xml';
                          $f = __DIR__ . '/' . basename($url);
                          if (!file_exists($f)) {
                      Severity: Major
                      Found in .dev/scripts/currencies/get_latest_currencies.php - About 2 hrs to fix

                        Function select_box has a Cognitive Complexity of 21 (exceeds 5 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: Minor
                        Found in plugins/html/classes/yf_html.class.php - About 2 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 _add_asset has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function _add_asset($_content, $asset_type, $_params = [])
                            {
                                if ( ! $_content) {
                                    return false;
                                }
                        Severity: Minor
                        Found in plugins/assets/classes/yf_assets.class.php - About 2 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 api_payout has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

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

                        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 provider has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function provider($options = null)
                            {
                                // import options
                                is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                // get providers
                        Severity: Minor
                        Found in plugins/payment/classes/yf_payment_api.class.php - About 2 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 _form_options has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

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

                        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 _operation_check has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function _operation_check($options = null)
                            {
                                $result = [];
                                $data = [];
                                // options
                        Severity: Minor
                        Found in plugins/payment/classes/yf_payment_api.class.php - About 2 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 filter_save has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function filter_save($params = [])
                            {
                                if ( ! is_array($params)) {
                                    $params = [];
                                }
                        Severity: Minor
                        Found in plugins/sys/classes/yf_admin_methods.class.php - About 2 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 api_payout has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function api_payout($options = null)
                            {
                                if ( ! $this->ENABLE) {
                                    return  null;
                                }
                        Severity: Minor
                        Found in plugins/payment/classes/yf_payment_api__provider_interkassa.class.php - About 2 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 find_all_hooks has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function find_all_hooks($section = 'all')
                            {
                                if ( ! in_array($section, ['all', 'user', 'admin'])) {
                                    $section = 'all';
                                }
                        Severity: Minor
                        Found in plugins/sys/classes/yf_admin_methods.class.php - About 2 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