fisharebest/localization

View on GitHub

Showing 64 of 64 total issues

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

<?php

namespace Fisharebest\Localization\Locale;

use Fisharebest\Localization\Language\LanguageDsb;
Severity: Major
Found in src/Locale/LocaleDsb.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/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\LanguageCv;
Severity: Major
Found in src/Locale/LocaleCv.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/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\LanguageSmn;
Severity: Major
Found in src/Locale/LocaleSmn.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/LocaleRn.php on lines 1..43
src/Locale/LocaleRu.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\LanguageMk;
Severity: Major
Found in src/Locale/LocaleMk.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/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\LanguageDua;
Severity: Major
Found in src/Locale/LocaleDua.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/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\LanguageGsw;
Severity: Major
Found in src/Locale/LocaleGsw.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/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\LanguageHsb;
Severity: Major
Found in src/Locale/LocaleHsb.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/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\LanguageTt;
Severity: Major
Found in src/Locale/LocaleTt.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/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

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\LanguageRu;
Severity: Major
Found in src/Locale/LocaleRu.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/LocaleRn.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\LanguageFr;
Severity: Major
Found in src/Locale/LocaleFr.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/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\LanguageBs;
Severity: Major
Found in src/Locale/LocaleBs.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/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\LanguageTk;
Severity: Major
Found in src/Locale/LocaleTk.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/LocaleRn.php on lines 1..43
src/Locale/LocaleRu.php on lines 1..43
src/Locale/LocaleSmn.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\LanguageBe;
Severity: Major
Found in src/Locale/LocaleBe.php and 21 other locations - About 40 mins to fix
src/Locale/LocaleBas.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

Function number has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function number($number)
    {
        if ($number < 0) {
            $number   = -$number;
            $negative = self::NEGATIVE;
Severity: Minor
Found in src/Locale/AbstractLocale.php - About 35 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

Function plural has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function plural($number)
    {
        $number = abs($number);

        if ($number === 1) {
Severity: Minor
Found in src/PluralRule/PluralRule13.php - About 35 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

Avoid too many return statements within this method.
Open

        return $default;
Severity: Major
Found in src/Locale.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return 4;
    Severity: Major
    Found in src/PluralRule/PluralRule11.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return 4;
      Severity: Major
      Found in src/PluralRule/PluralRule12.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return 5;
        Severity: Major
        Found in src/PluralRule/PluralRule12.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return 4;
          Severity: Major
          Found in src/PluralRule/PluralRule13.php - About 30 mins to fix
            Severity
            Category
            Status
            Source
            Language