fisharebest/localization

View on GitHub

Showing 64 of 64 total issues

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

<?php

namespace Fisharebest\Localization\Locale;

use Fisharebest\Localization\Language\LanguageKsh;
Severity: Major
Found in src/Locale/LocaleKsh.php and 3 other locations - About 1 hr to fix
src/Locale/LocaleFo.php on lines 1..44
src/Locale/LocaleKl.php on lines 1..44
src/Locale/LocaleSe.php on lines 1..44

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

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

<?php

namespace Fisharebest\Localization\Locale;

use Fisharebest\Localization\Language\LanguageKl;
Severity: Major
Found in src/Locale/LocaleKl.php and 3 other locations - About 1 hr to fix
src/Locale/LocaleFo.php on lines 1..44
src/Locale/LocaleKsh.php on lines 1..44
src/Locale/LocaleSe.php on lines 1..44

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

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 __construct has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct($filename)
    {
        $this->translations = array();

        switch (strtolower(pathinfo($filename, PATHINFO_EXTENSION))) {
Severity: Minor
Found in src/Translation.php - About 1 hr to fix

    Function __construct has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        public function __construct($filename)
        {
            $this->translations = array();
    
            switch (strtolower(pathinfo($filename, PATHINFO_EXTENSION))) {
    Severity: Minor
    Found in src/Translation.php - About 1 hr 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 httpAcceptLanguage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function httpAcceptLanguage(array $server, array $available, LocaleInterface $default)
        {
            if (!empty($server['HTTP_ACCEPT_LANGUAGE'])) {
                $http_accept_language = strtolower(str_replace(' ', '', $server['HTTP_ACCEPT_LANGUAGE']));
                preg_match_all('/([a-z][a-z0-9_-]+)(?:;q=([0-9.]+))?/', $http_accept_language, $match);
    Severity: Minor
    Found in src/Locale.php - About 1 hr to fix

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageSk;
      Severity: Major
      Found in src/Locale/LocaleSk.php and 4 other locations - About 1 hr to fix
      src/Locale/LocaleCs.php on lines 1..48
      src/Locale/LocaleDa.php on lines 1..48
      src/Locale/LocaleDe.php on lines 1..48
      src/Locale/LocaleRo.php on lines 1..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 101.

      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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageRo;
      Severity: Major
      Found in src/Locale/LocaleRo.php and 4 other locations - About 1 hr to fix
      src/Locale/LocaleCs.php on lines 1..48
      src/Locale/LocaleDa.php on lines 1..48
      src/Locale/LocaleDe.php on lines 1..48
      src/Locale/LocaleSk.php on lines 1..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 101.

      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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageDe;
      Severity: Major
      Found in src/Locale/LocaleDe.php and 4 other locations - About 1 hr to fix
      src/Locale/LocaleCs.php on lines 1..48
      src/Locale/LocaleDa.php on lines 1..48
      src/Locale/LocaleRo.php on lines 1..48
      src/Locale/LocaleSk.php on lines 1..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 101.

      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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageDa;
      Severity: Major
      Found in src/Locale/LocaleDa.php and 4 other locations - About 1 hr to fix
      src/Locale/LocaleCs.php on lines 1..48
      src/Locale/LocaleDe.php on lines 1..48
      src/Locale/LocaleRo.php on lines 1..48
      src/Locale/LocaleSk.php on lines 1..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 101.

      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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageCs;
      Severity: Major
      Found in src/Locale/LocaleCs.php and 4 other locations - About 1 hr to fix
      src/Locale/LocaleDa.php on lines 1..48
      src/Locale/LocaleDe.php on lines 1..48
      src/Locale/LocaleRo.php on lines 1..48
      src/Locale/LocaleSk.php on lines 1..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 101.

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

          public static function httpAcceptLanguage(array $server, array $available, LocaleInterface $default)
          {
              if (!empty($server['HTTP_ACCEPT_LANGUAGE'])) {
                  $http_accept_language = strtolower(str_replace(' ', '', $server['HTTP_ACCEPT_LANGUAGE']));
                  preg_match_all('/([a-z][a-z0-9_-]+)(?:;q=([0-9.]+))?/', $http_accept_language, $match);
      Severity: Minor
      Found in src/Locale.php - About 55 mins 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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageCa;
      Severity: Major
      Found in src/Locale/LocaleCa.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBas.php on lines 1..43
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBr.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCu.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGl.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleIu.php on lines 1..43
      src/Locale/LocaleLb.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRm.php on lines 1..43
      src/Locale/LocaleRn.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageRn;
      Severity: Major
      Found in src/Locale/LocaleRn.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBas.php on lines 1..43
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBr.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCa.php on lines 1..43
      src/Locale/LocaleCu.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGl.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleIu.php on lines 1..43
      src/Locale/LocaleLb.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRm.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageBas;
      Severity: Major
      Found in src/Locale/LocaleBas.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBr.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCa.php on lines 1..43
      src/Locale/LocaleCu.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGl.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleIu.php on lines 1..43
      src/Locale/LocaleLb.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRm.php on lines 1..43
      src/Locale/LocaleRn.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageRm;
      Severity: Major
      Found in src/Locale/LocaleRm.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBas.php on lines 1..43
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBr.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCa.php on lines 1..43
      src/Locale/LocaleCu.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGl.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleIu.php on lines 1..43
      src/Locale/LocaleLb.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRn.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageCu;
      Severity: Major
      Found in src/Locale/LocaleCu.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBas.php on lines 1..43
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBr.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCa.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGl.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleIu.php on lines 1..43
      src/Locale/LocaleLb.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRm.php on lines 1..43
      src/Locale/LocaleRn.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageGl;
      Severity: Major
      Found in src/Locale/LocaleGl.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBas.php on lines 1..43
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBr.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCa.php on lines 1..43
      src/Locale/LocaleCu.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleIu.php on lines 1..43
      src/Locale/LocaleLb.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRm.php on lines 1..43
      src/Locale/LocaleRn.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageIu;
      Severity: Major
      Found in src/Locale/LocaleIu.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBas.php on lines 1..43
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBr.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCa.php on lines 1..43
      src/Locale/LocaleCu.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGl.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleLb.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRm.php on lines 1..43
      src/Locale/LocaleRn.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageLb;
      Severity: Major
      Found in src/Locale/LocaleLb.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBas.php on lines 1..43
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBr.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCa.php on lines 1..43
      src/Locale/LocaleCu.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGl.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleIu.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRm.php on lines 1..43
      src/Locale/LocaleRn.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

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

      <?php
      
      namespace Fisharebest\Localization\Locale;
      
      use Fisharebest\Localization\Language\LanguageBr;
      Severity: Major
      Found in src/Locale/LocaleBr.php and 21 other locations - About 40 mins to fix
      src/Locale/LocaleBas.php on lines 1..43
      src/Locale/LocaleBe.php on lines 1..43
      src/Locale/LocaleBs.php on lines 1..43
      src/Locale/LocaleCa.php on lines 1..43
      src/Locale/LocaleCu.php on lines 1..43
      src/Locale/LocaleCv.php on lines 1..43
      src/Locale/LocaleDsb.php on lines 1..43
      src/Locale/LocaleDua.php on lines 1..43
      src/Locale/LocaleFr.php on lines 1..43
      src/Locale/LocaleGl.php on lines 1..43
      src/Locale/LocaleGsw.php on lines 1..43
      src/Locale/LocaleHsb.php on lines 1..43
      src/Locale/LocaleIu.php on lines 1..43
      src/Locale/LocaleLb.php on lines 1..43
      src/Locale/LocaleMk.php on lines 1..43
      src/Locale/LocaleRm.php on lines 1..43
      src/Locale/LocaleRn.php on lines 1..43
      src/Locale/LocaleRu.php on lines 1..43
      src/Locale/LocaleSmn.php on lines 1..43
      src/Locale/LocaleTk.php on lines 1..43
      src/Locale/LocaleTt.php on lines 1..43

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

      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