rhosocial/rho.social

View on GitHub

Showing 1,384 of 1,384 total issues

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

        refresh: function () {
            getPageCount();
            if (typeof pub.currentPage !== "number" || pub.currentPage < 0) {
                pub.currentPage = 0;
            }
Severity: Major
Found in my.rho.social/widgets/item/assets/item/js/rho.my.item.js and 1 other location - About 4 hrs to fix
contact.rho.social/widgets/contact/assets/panel/js/rho.contact.panel.js on lines 36..48

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 128.

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

Function item has 112 lines of code (exceeds 25 allowed). Consider refactoring.
Open

rho.my.item = (function ($) {
    var pub = {
        pageCountUrl: '/api/item/page-count',
        itemWidgetsUrl: '/api/item/widget-list',
        itemWidgetUrl: '/api/item/widget-get',
Severity: Major
Found in my.rho.social/widgets/item/assets/item/js/rho.my.item.js - About 4 hrs to fix

    Function panel has 111 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    rho.contact.panel = (function ($) {
        var pub = {
            pageCountUrl: '/v1/contact/page-count',
            itemWidgetsUrl: '/v1/contact/widget-list',
            itemWidgetUrl: '/v1/contact/widget-get',

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

      <?php
      
      /**
       *  _   __ __ _____ _____ ___  ____  _____
       * | | / // // ___//_  _//   ||  __||_   _|
      Severity: Major
      Found in sso.rho.social/config/main.php and 1 other location - About 4 hrs to fix
      my.rho.social/config/main.php on lines 1..38

      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 168.

      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

      <?php
      
      /**
       *  _   __ __ _____ _____ ___  ____  _____
       * | | / // // ___//_  _//   ||  __||_   _|
      Severity: Major
      Found in my.rho.social/config/main.php and 1 other location - About 4 hrs to fix
      sso.rho.social/config/main.php on lines 1..39

      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 168.

      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 7 locations. Consider refactoring.
      Open

      <?php
      defined('YII_DEBUG') or define('YII_DEBUG', true);
      defined('YII_ENV') or define('YII_ENV', 'dev');
      
      require(__DIR__ . '/../../vendor/autoload.php');
      Severity: Major
      Found in client.rho.social/web/index.php and 6 other locations - About 4 hrs to fix
      contact.rho.social/web/index.php on lines 1..18
      express.rho.social/web/index.php on lines 1..18
      message.rho.social/web/index.php on lines 1..18
      my.rho.social/web/index.php on lines 1..18
      reg.rho.social/web/index.php on lines 1..18
      rho.social/web/index.php on lines 1..18

      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 165.

      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 7 locations. Consider refactoring.
      Open

      <?php
      defined('YII_DEBUG') or define('YII_DEBUG', true);
      defined('YII_ENV') or define('YII_ENV', 'dev');
      
      require(__DIR__ . '/../../vendor/autoload.php');
      Severity: Major
      Found in message.rho.social/web/index.php and 6 other locations - About 4 hrs to fix
      client.rho.social/web/index.php on lines 1..18
      contact.rho.social/web/index.php on lines 1..18
      express.rho.social/web/index.php on lines 1..18
      my.rho.social/web/index.php on lines 1..18
      reg.rho.social/web/index.php on lines 1..18
      rho.social/web/index.php on lines 1..18

      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 165.

      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 7 locations. Consider refactoring.
      Open

      <?php
      defined('YII_DEBUG') or define('YII_DEBUG', true);
      defined('YII_ENV') or define('YII_ENV', 'dev');
      
      require(__DIR__ . '/../../vendor/autoload.php');
      Severity: Major
      Found in rho.social/web/index.php and 6 other locations - About 4 hrs to fix
      client.rho.social/web/index.php on lines 1..18
      contact.rho.social/web/index.php on lines 1..18
      express.rho.social/web/index.php on lines 1..18
      message.rho.social/web/index.php on lines 1..18
      my.rho.social/web/index.php on lines 1..18
      reg.rho.social/web/index.php on lines 1..18

      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 165.

      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 7 locations. Consider refactoring.
      Open

      <?php
      defined('YII_DEBUG') or define('YII_DEBUG', true);
      defined('YII_ENV') or define('YII_ENV', 'dev');
      
      require(__DIR__ . '/../../vendor/autoload.php');
      Severity: Major
      Found in express.rho.social/web/index.php and 6 other locations - About 4 hrs to fix
      client.rho.social/web/index.php on lines 1..18
      contact.rho.social/web/index.php on lines 1..18
      message.rho.social/web/index.php on lines 1..18
      my.rho.social/web/index.php on lines 1..18
      reg.rho.social/web/index.php on lines 1..18
      rho.social/web/index.php on lines 1..18

      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 165.

      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 7 locations. Consider refactoring.
      Open

      <?php
      defined('YII_DEBUG') or define('YII_DEBUG', true);
      defined('YII_ENV') or define('YII_ENV', 'dev');
      
      require(__DIR__ . '/../../vendor/autoload.php');
      Severity: Major
      Found in my.rho.social/web/index.php and 6 other locations - About 4 hrs to fix
      client.rho.social/web/index.php on lines 1..18
      contact.rho.social/web/index.php on lines 1..18
      express.rho.social/web/index.php on lines 1..18
      message.rho.social/web/index.php on lines 1..18
      reg.rho.social/web/index.php on lines 1..18
      rho.social/web/index.php on lines 1..18

      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 165.

      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 7 locations. Consider refactoring.
      Open

      <?php
      defined('YII_DEBUG') or define('YII_DEBUG', true);
      defined('YII_ENV') or define('YII_ENV', 'dev');
      
      require(__DIR__ . '/../../vendor/autoload.php');
      Severity: Major
      Found in reg.rho.social/web/index.php and 6 other locations - About 4 hrs to fix
      client.rho.social/web/index.php on lines 1..18
      contact.rho.social/web/index.php on lines 1..18
      express.rho.social/web/index.php on lines 1..18
      message.rho.social/web/index.php on lines 1..18
      my.rho.social/web/index.php on lines 1..18
      rho.social/web/index.php on lines 1..18

      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 165.

      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 7 locations. Consider refactoring.
      Open

      <?php
      defined('YII_DEBUG') or define('YII_DEBUG', true);
      defined('YII_ENV') or define('YII_ENV', 'dev');
      
      require(__DIR__ . '/../../vendor/autoload.php');
      Severity: Major
      Found in contact.rho.social/web/index.php and 6 other locations - About 4 hrs to fix
      client.rho.social/web/index.php on lines 1..18
      express.rho.social/web/index.php on lines 1..18
      message.rho.social/web/index.php on lines 1..18
      my.rho.social/web/index.php on lines 1..18
      reg.rho.social/web/index.php on lines 1..18
      rho.social/web/index.php on lines 1..18

      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 165.

      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

              init: function () {
                  $(document).ready(function () {
                      $("#" + pub.btnPrev).click(pub.prev);
                      $("#" + pub.btnNext).click(pub.next);
                      $("#" + pub.btnRefresh).click(pub.refresh);
      Severity: Major
      Found in my.rho.social/widgets/item/assets/item/js/rho.my.item.js and 1 other location - About 3 hrs to fix
      contact.rho.social/widgets/contact/assets/panel/js/rho.contact.panel.js on lines 49..55

      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 111.

      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

              init: function () {
                  $(document).ready(function () {
                      $("#" + pub.btnPrev).click(pub.prev);
                      $("#" + pub.btnNext).click(pub.next);
                      $("#" + pub.btnRefresh).click(pub.refresh);
      my.rho.social/widgets/item/assets/item/js/rho.my.item.js on lines 28..34

      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 111.

      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

      <?php
      
      /**
       *  _   __ __ _____ _____ ___  ____  _____
       * | | / // // ___//_  _//   ||  __||_   _|
      Severity: Major
      Found in common/models/user/contact/PhoneRelation.php and 1 other location - About 3 hrs to fix
      common/models/user/contact/URLRelation.php on lines 1..62

      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 150.

      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

      <?php
      
      /**
       *  _   __ __ _____ _____ ___  ____  _____
       * | | / // // ___//_  _//   ||  __||_   _|
      Severity: Major
      Found in common/models/user/contact/URLRelation.php and 1 other location - About 3 hrs to fix
      common/models/user/contact/PhoneRelation.php on lines 1..64

      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 150.

      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

          public function rules()
          {
              return [
                  [['alpha', 'localname', 'romanname', 'numericcode', 'city', 'province', 'country'], 'required'],
                  [['alpha', 'localname', 'romanname', 'city', 'province', 'country'], 'string'],
      Severity: Major
      Found in common/models/constants/region/Redis/District.php and 1 other location - About 3 hrs to fix
      common/models/constants/region/District.php on lines 68..77

      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 149.

      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

          public function rules()
          {
              return [
                  [['alpha2', 'localname', 'romanname', 'numericcode', 'category', 'country'], 'required'],
                  [['alpha2', 'localname', 'romanname', 'category', 'country'], 'string'],
      Severity: Major
      Found in common/models/constants/region/Province.php and 1 other location - About 3 hrs to fix
      common/models/constants/region/Redis/Province.php on lines 64..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 149.

      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

          public function rules()
          {
              return [
                  [['alpha2', 'localname', 'romanname', 'numericcode', 'category', 'country'], 'required'],
                  [['alpha2', 'localname', 'romanname', 'category', 'country'], 'string'],
      Severity: Major
      Found in common/models/constants/region/Redis/Province.php and 1 other location - About 3 hrs to fix
      common/models/constants/region/Province.php on lines 66..75

      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 149.

      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

          public function rules()
          {
              return [
                  [['alpha', 'localname', 'romanname', 'numericcode', 'city', 'province', 'country'], 'required'],
                  [['alpha', 'localname', 'romanname', 'city', 'province', 'country'], 'string'],
      Severity: Major
      Found in common/models/constants/region/District.php and 1 other location - About 3 hrs to fix
      common/models/constants/region/Redis/District.php on lines 65..74

      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 149.

      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