wikimedia/mediawiki-extensions-Wikibase

View on GitHub
repo/Wikibase.i18n.alias.php

Summary

Maintainability
F
1 wk
Test Coverage

File Wikibase.i18n.alias.php has 464 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * Aliases for the special pages of the Wikibase Repository extension.
 *
Severity: Minor
Found in repo/Wikibase.i18n.alias.php - About 7 hrs to fix

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

    $specialPageAliases['en'] = [
        'AvailableBadges' => [ 'AvailableBadges' ],
        'DispatchStats' => [ 'DispatchStats' ],
        'EntityData' => [ 'EntityData' ],
        'EntityPage' => [ 'EntityPage' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 1 other location - About 6 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 217..238

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

    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

    $specialPageAliases['hi'] = [
        'AvailableBadges' => [ 'उपलब्ध_बैजेस' ],
        'DispatchStats' => [ 'तैनात_सांख्यिकी' ],
        'EntityData' => [ 'सत्ता_डेटा' ],
        'EntityPage' => [ 'सत्ता' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 1 other location - About 6 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 13..34

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 210.

    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

    $specialPageAliases['nn'] = [
        'AvailableBadges' => [ 'Tilgjengelige_merke' ],
        'EntityData' => [ 'Entitetsdata' ],
        'EntityPage' => [ 'Entitetsside' ],
        'GoToLinkedPage' => [ 'Gå_til_lenkja_side', 'Gå_til_lenka_side' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 1 other location - About 5 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 337..357

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

    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

    $specialPageAliases['nb'] = [
        'AvailableBadges' => [ 'Tilgjengelige_merker' ],
        'EntityData' => [ 'Entitetsdata' ],
        'EntityPage' => [ 'Entitetsside' ],
        'GoToLinkedPage' => [ 'Gå_til_lenket_side', 'Gå_til_lenka_side' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 1 other location - About 5 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 401..421

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

    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

    $specialPageAliases['ar'] = [
        'DispatchStats' => [ 'إحصاءات_الوصول' ],
        'EntityData' => [ 'بيانات_الكيانات' ],
        'GoToLinkedPage' => [ 'الذهاب_للصفحة_الموصولة' ],
        'ItemByTitle' => [ 'المدخلات_بالعنوان' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 1 other location - About 4 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 380..398

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 168.

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

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

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

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

    Refactorings

    Further Reading

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

    $specialPageAliases['nl'] = [
        'DispatchStats' => [ 'Verwerkingsstatistieken' ],
        'EntityData' => [ 'Entiteitsgegevens' ],
        'GoToLinkedPage' => [ 'NaarGekoppeldePaginaGaan' ],
        'ItemByTitle' => [ 'ItemPerTitel' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 1 other location - About 4 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 37..55

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 168.

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

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

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

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

    Refactorings

    Further Reading

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

    $specialPageAliases['mk'] = [
        'DispatchStats' => [ 'СтатистикиСпроведување' ],
        'EntityData' => [ 'ЕдиницаПодатоци' ],
        'GoToLinkedPage' => [ 'ОдиНаСврзанаСтраница' ],
        'ItemByTitle' => [ 'ПредметПоНаслов' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 2 other locations - About 3 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 150..167
    repo/Wikibase.i18n.alias.php on lines 495..512

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

    $specialPageAliases['zh-hans'] = [
        'DispatchStats' => [ '发送统计' ],
        'EntityData' => [ '实体数据' ],
        'GoToLinkedPage' => [ '前往已链接页面' ],
        'ItemByTitle' => [ '项按标题' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 2 other locations - About 3 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 150..167
    repo/Wikibase.i18n.alias.php on lines 360..377

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

    $specialPageAliases['de'] = [
        'DispatchStats' => [ 'Abfertigungsstatistiken' ],
        'EntityData' => [ 'Objektdaten' ],
        'GoToLinkedPage' => [ 'Gehe_zur_verlinkten_Seite' ],
        'ItemByTitle' => [ 'Datenelement_nach_Name' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 2 other locations - About 3 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 360..377
    repo/Wikibase.i18n.alias.php on lines 495..512

    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

    $specialPageAliases['cdo'] = [
        'DispatchStats' => [ '特派統計' ],
        'EntityData' => [ '條目數據' ],
        'ItemByTitle' => [ '標題其單單' ],
        'ItemDisambiguation' => [ '消除歧義其單單' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 1 other location - About 2 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 435..449

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

    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

    $specialPageAliases['sv'] = [
        'EntityData' => [ 'Objektdata' ],
        'ItemByTitle' => [ 'Objekt_efter_titel' ],
        'ItemDisambiguation' => [ 'Objektsärskiljning' ],
        'ItemsWithoutSitelinks' => [ 'Objekt_utan_webbplatslänk' ],
    Severity: Major
    Found in repo/Wikibase.i18n.alias.php and 1 other location - About 2 hrs to fix
    repo/Wikibase.i18n.alias.php on lines 111..125

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

    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

    There are no issues that match your filters.

    Category
    Status