Showing 4,217 of 4,217 total issues

Method _get_methods has 81 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/admin/admin_modules/yf_admin_modules.class.php - About 3 hrs to fix

    Method _render_as_html has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function _render_as_html(&$params, &$a, &$to_hide)
        {
            $body = '';
            $header_links = [];
            if (MAIN_TYPE_ADMIN && ! $params['no_pages'] && ! $params['no_total'] && $a['total']) {
    Severity: Major
    Found in plugins/table2/classes/yf_table2.class.php - About 3 hrs to fix

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

          public function get($key = null, $val = null)
          {
              if ($val !== null) {
                  $_GET[$key] = $val;
              }
      Severity: Major
      Found in plugins/sys/classes/yf_input.class.php and 4 other locations - About 3 hrs to fix
      plugins/sys/classes/yf_input.class.php on lines 47..61
      plugins/sys/classes/yf_input.class.php on lines 68..82
      plugins/sys/classes/yf_input.class.php on lines 89..103
      plugins/sys/classes/yf_input.class.php on lines 132..146

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

          public function session($key = null, $val = null)
          {
              if ($val !== null) {
                  $_SESSION[$key] = $val;
              }
      Severity: Major
      Found in plugins/sys/classes/yf_input.class.php and 4 other locations - About 3 hrs to fix
      plugins/sys/classes/yf_input.class.php on lines 26..40
      plugins/sys/classes/yf_input.class.php on lines 47..61
      plugins/sys/classes/yf_input.class.php on lines 89..103
      plugins/sys/classes/yf_input.class.php on lines 132..146

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

          public function server($key = null, $val = null)
          {
              if ($val !== null) {
                  $_SERVER[$key] = $val;
              }
      Severity: Major
      Found in plugins/sys/classes/yf_input.class.php and 4 other locations - About 3 hrs to fix
      plugins/sys/classes/yf_input.class.php on lines 26..40
      plugins/sys/classes/yf_input.class.php on lines 47..61
      plugins/sys/classes/yf_input.class.php on lines 68..82
      plugins/sys/classes/yf_input.class.php on lines 132..146

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

                  if ($plugin_name) {
                      $places += [
                          'framework_plugin' => ['dir' => YF_PATH . 'plugins/' . $plugin_name . '/' . $dir, 'file' => YF_PREFIX . $name . YF_CLS_EXT],
                          'project_plugin' => ['dir' => PROJECT_PATH . 'plugins/' . $plugin_name . '/' . $dir, 'file' => $name . YF_CLS_EXT],
                          'app_plugin' => ['dir' => APP_PATH . 'plugins/' . $plugin_name . '/' . $dir, 'file' => $name . YF_CLS_EXT],
      Severity: Major
      Found in plugins/admin/admin_modules/yf_admin_modules.class.php and 1 other location - About 3 hrs to fix
      plugins/user/admin_modules/yf_user_modules.class.php on lines 67..73

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

                  if ($plugin_name) {
                      $places += [
                          'framework_plugin' => ['dir' => YF_PATH . 'plugins/' . $plugin_name . '/' . $dir, 'file' => YF_PREFIX . $name . YF_CLS_EXT],
                          'project_plugin' => ['dir' => PROJECT_PATH . 'plugins/' . $plugin_name . '/' . $dir, 'file' => $name . YF_CLS_EXT],
                          'app_plugin' => ['dir' => APP_PATH . 'plugins/' . $plugin_name . '/' . $dir, 'file' => $name . YF_CLS_EXT],
      Severity: Major
      Found in plugins/user/admin_modules/yf_user_modules.class.php and 1 other location - About 3 hrs to fix
      plugins/admin/admin_modules/yf_admin_modules.class.php on lines 65..71

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

          public function env($key = null, $val = null)
          {
              if ($val !== null) {
                  $_ENV[$key] = $val;
              }
      Severity: Major
      Found in plugins/sys/classes/yf_input.class.php and 4 other locations - About 3 hrs to fix
      plugins/sys/classes/yf_input.class.php on lines 26..40
      plugins/sys/classes/yf_input.class.php on lines 47..61
      plugins/sys/classes/yf_input.class.php on lines 68..82
      plugins/sys/classes/yf_input.class.php on lines 89..103

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

          public function post($key = null, $val = null)
          {
              if ($val !== null) {
                  $_POST[$key] = $val;
              }
      Severity: Major
      Found in plugins/sys/classes/yf_input.class.php and 4 other locations - About 3 hrs to fix
      plugins/sys/classes/yf_input.class.php on lines 26..40
      plugins/sys/classes/yf_input.class.php on lines 68..82
      plugins/sys/classes/yf_input.class.php on lines 89..103
      plugins/sys/classes/yf_input.class.php on lines 132..146

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          public function _auto_update_items_orders($menu_id)
          {
              if ( ! $menu_id) {
                  return false;
              }
      Severity: Major
      Found in plugins/sys/admin_modules/yf_menus_editor.class.php and 1 other location - About 3 hrs to fix
      plugins/categories/admin_modules/yf_category_editor.class.php on lines 468..493

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          public function _auto_update_items_orders($cat_id)
          {
              if ( ! $cat_id) {
                  return false;
              }
      plugins/sys/admin_modules/yf_menus_editor.class.php on lines 350..375

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 146.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Method cancel has 80 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function cancel($options = null)
          {
              // import options
              is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
              // var
      Severity: Major
      Found in plugins/payment/classes/yf_payment_api.class.php - About 3 hrs to fix

        Method deposition has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

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

              public function add($object_name, $ids = [], $action = null, $extra = [])
              {
                  if ( ! $this->ENABLED) {
                      return false;
                  }
          Severity: Major
          Found in plugins/db/admin_modules/yf_manage_revisions.class.php - About 3 hrs to fix

            Method upload_images has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function upload_images()
                {
                    $SUPPLIER_ID = $this->SUPPLIER_ID;
                    $ADMIN_INFO = db()->query_fetch('SELECT * FROM ' . db('sys_admin') . ' WHERE id=' . (int) (main()->ADMIN_ID));
                    $SUPPLIER_INFO = db()->query_fetch('SELECT * FROM ' . db('shop_suppliers') . ' WHERE id=' . (int) $SUPPLIER_ID);

              Method _get_methods has 80 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/user/admin_modules/yf_user_modules.class.php - About 3 hrs to fix

                yf_module has 27 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class yf_module
                {
                    /** @var bool */
                    public $USE_CAPTCHA = true;
                    /** @var bool Force stripslashes on '_format_text' method */
                Severity: Minor
                Found in classes/yf_module.class.php - About 3 hrs to fix

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

                      public function go($new_file_path, $name_in_form = 'image', $max_image_size = 0, $is_local = false)
                      {
                          // We do not want to user break our operation
                          ignore_user_abort(true);
                          // New name is required
                  Severity: Major
                  Found in plugins/common/classes/common/yf_upload_image.class.php - About 3 hrs to fix

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                            if (is_array($o_options['processing'])) {
                                $processing_log = array_reverse($o_options['processing']);
                                $processing = reset($processing_log);
                                if (@$processing['provider_name'] && $processing['provider_name'] != $provider_name) {
                                    @list($processing_provider_id, $processing_provider) = $payment_api->get_provider([
                    Severity: Major
                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 3 hrs to fix
                    plugins/payment/admin_modules/yf_manage_transfer.class.php on lines 521..534

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 145.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                            if (is_array($o_options['processing'])) {
                                $processing_log = array_reverse($o_options['processing']);
                                $processing = reset($processing_log);
                                if (@$processing['provider_name'] && $processing['provider_name'] != $provider_name) {
                                    @list($processing_provider_id, $processing_provider) = $payment_api->get_provider([
                    Severity: Major
                    Found in plugins/payment/admin_modules/yf_manage_transfer.class.php and 1 other location - About 3 hrs to fix
                    plugins/payment/admin_modules/yf_manage_payout.class.php on lines 937..950

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 145.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Severity
                    Category
                    Status
                    Source
                    Language