luyadev/luya-module-crawler

View on GitHub

Showing 31 of 31 total issues

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

<?php
return [
    'crawler' => 'Crawler',
    'crawler_indexing' => 'Indexando',
    'crawler_analytics' => 'Analytics',
Severity: Major
Found in src/admin/messages/pt/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Crawler', // untranslatable
    'crawler_indexing' => 'Indexage',
    'crawler_analytics' => 'Analytique',
Severity: Major
Found in src/admin/messages/fr/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Crawler',
    'crawler_indexing' => 'Indeksleme',
    'crawler_analytics' => 'Analitik',
Severity: Major
Found in src/admin/messages/tr/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Rastreador',
    'crawler_indexing' => 'Indexación',
    'crawler_analytics' => 'Analytics',
Severity: Major
Found in src/admin/messages/es/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Поисковый движок',
    'crawler_indexing' => 'Индексация',
    'crawler_analytics' => 'Аналитика',
Severity: Major
Found in src/admin/messages/ru/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Crawler',
    'crawler_indexing' => 'Indexing',
    'crawler_analytics' => 'Analytics',
Severity: Major
Found in src/admin/messages/en/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Crawler',
    'crawler_indexing' => 'Δεικτοδότηση (Indexing)',
    'crawler_analytics' => 'Analytics',
Severity: Major
Found in src/admin/messages/el/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Crawler',
    'crawler_indexing' => 'Indexing',
    'crawler_analytics' => 'Analytics',
Severity: Major
Found in src/admin/messages/vi/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Пошуковий двигун',
    'crawler_indexing' => 'Індексація',
    'crawler_analytics' => 'Аналітика',
Severity: Major
Found in src/admin/messages/ua/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Crawler',
    'crawler_indexing' => 'Indexing',
    'crawler_analytics' => 'Analytics',
Severity: Major
Found in src/admin/messages/it/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Crawler',
    'crawler_indexing' => 'Indexierung',
    'crawler_analytics' => 'Analytics',
Severity: Major
Found in src/admin/messages/de/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Crawler',
    'crawler_indexing' => 'Индексиране',
    'crawler_analytics' => 'Анализ',
Severity: Major
Found in src/admin/messages/bg/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/id/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

<?php
return [
    'crawler' => 'Perayap',
    'crawler_indexing' => 'Pengindeksan',
    'crawler_analytics' => 'Analitik',
Severity: Major
Found in src/admin/messages/id/crawleradmin.php and 12 other locations - About 5 hrs to fix
src/admin/messages/bg/crawleradmin.php on lines 1..52
src/admin/messages/de/crawleradmin.php on lines 1..52
src/admin/messages/el/crawleradmin.php on lines 1..52
src/admin/messages/en/crawleradmin.php on lines 1..52
src/admin/messages/es/crawleradmin.php on lines 1..52
src/admin/messages/fr/crawleradmin.php on lines 1..52
src/admin/messages/it/crawleradmin.php on lines 1..52
src/admin/messages/pt/crawleradmin.php on lines 1..52
src/admin/messages/ru/crawleradmin.php on lines 1..52
src/admin/messages/tr/crawleradmin.php on lines 1..52
src/admin/messages/ua/crawleradmin.php on lines 1..52
src/admin/messages/vi/crawleradmin.php on lines 1..52

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

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

    public function actionIndex()
    {
        $startTime = time();

        $crawler = new Crawler($this->module->baseUrl, new RuntimeStorage, new LoopRunner);
Severity: Minor
Found in src/frontend/commands/CrawlController.php - About 3 hrs 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

File Index.php has 267 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace luya\crawler\models;

use luya\admin\ngrest\base\NgRestModel;
Severity: Minor
Found in src/models/Index.php - About 2 hrs to fix

    Method actionIndex has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function actionIndex()
        {
            $startTime = time();
    
            $crawler = new Crawler($this->module->baseUrl, new RuntimeStorage, new LoopRunner);
    Severity: Major
    Found in src/frontend/commands/CrawlController.php - About 2 hrs to fix

      Method onEnd has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function onEnd(Crawler $crawler)
          {
              $transaction = Yii::$app->db->beginTransaction();
              try {
                  $keepIndexIds = [];
      Severity: Major
      Found in src/crawler/ResultHandler.php - About 2 hrs to fix

        Function onEnd has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

            public function onEnd(Crawler $crawler)
            {
                $transaction = Yii::$app->db->beginTransaction();
                try {
                    $keepIndexIds = [];
        Severity: Minor
        Found in src/crawler/ResultHandler.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

        Function indexer has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            private static function indexer($keyword, array $results, &$index)
            {
                // its only empty when the indexer runs for the first word
                if (empty($index)) {
                    foreach ($results as $id => $v) {
        Severity: Minor
        Found in src/models/Index.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 actionIndex has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function actionIndex($query = null, $page = null, $group = null, $resolveId = null)
            {
                $language = Yii::$app->composition->getKey('langShortCode');
                $searchData = null;
                if (empty($query)) {
        Severity: Minor
        Found in src/frontend/controllers/DefaultController.php - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language