luyadev/luya-module-news

View on GitHub

Showing 19 of 19 total issues

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

    public function actionIndex()
    {
        $provider = new ActiveDataProvider([
            'query' => Article::find()->andWhere(['is_deleted' => false, 'is_online' => true, 'is_archived' => false])->with(['createUser']),
            'sort' => [
Severity: Major
Found in src/frontend/controllers/DefaultController.php and 1 other location - About 3 hrs to fix
src/frontend/controllers/DefaultController.php on lines 66..84

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

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

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

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

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

Refactorings

Further Reading

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

    public function actionArchive()
    {
        $provider = new ActiveDataProvider([
            'query' => Article::find()->andWhere(['is_deleted' => false, 'is_online' => true, 'is_archived' => true])->with(['createUser']),
            'sort' => [
Severity: Major
Found in src/frontend/controllers/DefaultController.php and 1 other location - About 3 hrs to fix
src/frontend/controllers/DefaultController.php on lines 32..50

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

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

<?php

return [

// added translation in 1.0.0-beta5:
Severity: Major
Found in src/admin/messages/de/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [

// added translation in 1.0.0-beta5:
Severity: Major
Found in src/admin/messages/ua/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php
return [
    // added translation in 1.0.0-beta5:
    'news' => 'Nieuws',
    'news_administrate' => 'Beheer',
Severity: Major
Found in src/admin/messages/nl/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [

// added translation in 1.0.0-beta5:
Severity: Major
Found in src/admin/messages/id/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [

// added translation in 1.0.0-beta5:
Severity: Major
Found in src/admin/messages/tr/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [

// added translation in 1.0.0-beta5:
Severity: Major
Found in src/admin/messages/vi/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.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 125.

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

<?php
return [
// added translation in 1.0.0-beta5:
     'news' => 'Новини',
     'news_administrate' => 'Администратор',
Severity: Major
Found in src/admin/messages/bg/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [

// added translation in 1.0.0-beta5:
Severity: Major
Found in src/admin/messages/en/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [
    'news' => 'Noticias',
    'news_administrate' => 'Administrar',
Severity: Major
Found in src/admin/messages/es/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php
return [
// added translation in 1.0.0-beta5:
        'news' => 'Νέα',
        'news_administrate' => 'Διαχείρηση',
Severity: Major
Found in src/admin/messages/el/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [

// added translation in 1.0.0-beta5:
Severity: Major
Found in src/admin/messages/pt/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php
return [
// added translation in 1.0.0-beta5:
    'news' => 'Notizie',
    'news_administrate' => 'Amministrazione',
Severity: Major
Found in src/admin/messages/it/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [
    /* Added translation in 1.0.0-beta5 */
    'news' => 'Actualités',
Severity: Major
Found in src/admin/messages/fr/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pl/newsadmin.php on lines 1..43
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php

return [

// added translation in 1.0.0-beta5:
Severity: Major
Found in src/admin/messages/pl/newsadmin.php and 13 other locations - About 2 hrs to fix
src/admin/messages/bg/newsadmin.php on lines 1..40
src/admin/messages/de/newsadmin.php on lines 1..43
src/admin/messages/el/newsadmin.php on lines 1..40
src/admin/messages/en/newsadmin.php on lines 1..43
src/admin/messages/es/newsadmin.php on lines 1..40
src/admin/messages/fr/newsadmin.php on lines 1..42
src/admin/messages/id/newsadmin.php on lines 1..43
src/admin/messages/it/newsadmin.php on lines 1..40
src/admin/messages/nl/newsadmin.php on lines 1..40
src/admin/messages/pt/newsadmin.php on lines 1..43
src/admin/messages/tr/newsadmin.php on lines 1..43
src/admin/messages/ua/newsadmin.php on lines 1..43
src/admin/messages/vi/newsadmin.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 125.

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

<?php
use yii\widgets\LinkPager;
use luya\admin\filters\MediumCrop;

/* @var $this \luya\web\View */
Severity: Major
Found in src/frontend/views/default/archive.php and 2 other locations - About 1 hr to fix
src/frontend/views/default/categories.php on lines 1..30
src/frontend/views/default/index.php on lines 1..30

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

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

<?php
use yii\widgets\LinkPager;
use luya\admin\filters\MediumCrop;

/* @var $this \luya\web\View */
Severity: Major
Found in src/frontend/views/default/index.php and 2 other locations - About 1 hr to fix
src/frontend/views/default/archive.php on lines 1..30
src/frontend/views/default/categories.php on lines 1..30

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

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

<?php
use yii\widgets\LinkPager;
use luya\admin\filters\MediumCrop;

/* @var $this \luya\web\View */
Severity: Major
Found in src/frontend/views/default/categories.php and 2 other locations - About 1 hr to fix
src/frontend/views/default/archive.php on lines 1..30
src/frontend/views/default/index.php on lines 1..30

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

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