Showing 3,246 of 4,217 total issues

Method api_payout has 179 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

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

    <?php
    
    class yf_ck_file_browser
    {
        public $TOP_DIR = '/uploads/';
    Severity: Minor
    Found in plugins/ckeditor/admin_modules/yf_ck_file_browser.class.php - About 7 hrs to fix

      Method create_data has 179 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function create_data()
          {
      try {
              // bear 1 is named Lawly. She is extremely dangerous. Especially when hungry.
              $bear_lawly = bear::create([
      Severity: Major
      Found in .dev/tests/functional/model/class_model_bears_test.Test.php - About 7 hrs to fix

        Method _get_iso639_list has 178 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _get_iso639_list()
            {
                // TODO: use db('languages') instead
                return [
                    'aa' => ['Afar'],

          Function translate_string has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
          Open

              public function translate_string($in, $args = 0, $lang = '')
              {
                  if ( ! $in) {
                      return $in;
                  }
          Severity: Minor
          Found in plugins/locale/classes/yf_i18n.class.php - About 7 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_methods has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
          Open

              public function _get_methods($params = [])
              {
                  $ONLY_PRIVATE_METHODS = [];
                  if (isset($params['private'])) {
                      $ONLY_PRIVATE_METHODS = $params['private'];
          Severity: Minor
          Found in plugins/sys/classes/core_api/yf_core_api_admin_modules.class.php - About 7 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 46 (exceeds 5 allowed). Consider refactoring.
          Open

              public function connect($db_host = '', $db_user = '', $db_pswd = null, $db_name = null, $force = false, $params = [])
              {
                  if (is_array($db_host)) {
                      $params = $db_host;
                      $db_host = '';
          Severity: Minor
          Found in plugins/db/classes/yf_db.class.php - About 7 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 show_metatags has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
          Open

              public function show_metatags($meta = [])
              {
                  if (empty($meta)) {
                      $meta = $this->META_DEFAULT;
                  }
          Severity: Minor
          Found in classes/yf_graphics.class.php - About 7 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

          Method _process has 176 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _process($params = [])
              {
                  // THESE ARE REQUIRED!
                  $SOURCE_ARRAY = $params['source_array'];
                  $TABLE_NAME = $params['table_name'];
          Severity: Major
          Found in plugins/common/classes/common/yf_related_content.class.php - About 7 hrs to fix

            Method _request has 175 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _request($url, $post = null, $options = null)
                {
                    // import options
                    is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                    // options
            Severity: Major
            Found in plugins/api/classes/yf_api.class.php - About 7 hrs to fix

              yf_db_utils_helper_create_table has 50 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class yf_db_utils_helper_create_table
              {
                  protected $utils = null;
                  protected $db_name = '';
                  protected $table_name = '';
              Severity: Minor
              Found in plugins/db/classes/db/yf_db_utils_helper_create_table.class.php - About 7 hrs to fix

                Method view has 173 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function view()
                    {
                        // check operation
                        $operation = $this->_operation();
                        // import options
                Severity: Major
                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 6 hrs to fix

                  Function _get_all_content_for_out has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function _get_all_content_for_out($out_type, $params = [])
                      {
                          $is_ajax = main()->is_ajax();
                          // Move down inlined content
                          $all_content = $this->get_content($out_type);
                  Severity: Minor
                  Found in plugins/assets/classes/yf_assets.class.php - About 6 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

                  tpl_driver_yf_core_test has 49 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class tpl_driver_yf_core_test extends tpl_abstract
                  {
                      public function return_true($out = '')
                      {
                          return $out ? (is_array($out) ? implode(',', $out) : $out) : 'true';
                  Severity: Minor
                  Found in .dev/tests/unit/tpl/tpl_driver_yf_core_test.Test.php - About 6 hrs to fix

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

                    <?php
                    
                    _class('payment_api__provider_remote');
                    
                    class yf_payment_api__provider_privat24 extends yf_payment_api__provider_remote
                    Severity: Minor
                    Found in plugins/payment/classes/yf_payment_api__provider_privat24.class.php - About 6 hrs to fix

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

                          public function _init()
                          {
                              $this->supported_conds = [
                                  'in' => function ($a) {
                                      return ' IN( ' . _es($a['value']) . ' )';
                      Severity: Major
                      Found in plugins/table2/classes/table2/yf_table2_filter.class.php - About 6 hrs to fix

                        Function html_out has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function html_out($out_type, $content_type, $str, $params = [])
                            {
                                if ( ! $out_type || ! $content_type || ! strlen($str)) {
                                    return false;
                                }
                        Severity: Minor
                        Found in plugins/assets/classes/yf_assets.class.php - About 6 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 _cleanup_menu_items has a Cognitive Complexity of 44 (exceeds 5 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 6 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

                        Method show has 168 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function show()
                            {
                                $object = &$this->object;
                                $action = &$this->action;
                                $filter_name = &$this->filter_name;
                        Severity: Major
                        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 6 hrs to fix

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

                          <?php
                          
                          class yf_rewrite
                          {
                              public $DEFAULT_HOST = '';
                          Severity: Minor
                          Found in plugins/rewrite/classes/yf_rewrite.class.php - About 6 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language