woothemes/woocommerce

View on GitHub
i18n/states.php

Summary

Maintainability
F
1 mo
Test Coverage

File states.php has 1796 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * States
 *
 * Returns an array of country states. This deprecates and replaces the /states/ directory found in older versions.
Severity: Major
Found in i18n/states.php - About 4 days to fix

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

        'JP' => array(
            'JP01' => __( 'Hokkaido', 'woocommerce' ),
            'JP02' => __( 'Aomori', 'woocommerce' ),
            'JP03' => __( 'Iwate', 'woocommerce' ),
            'JP04' => __( 'Miyagi', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 3 days to fix
    i18n/states.php on lines 886..934

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

    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

        'KE' => array( // Kenya counties.
            'KE01' => __( 'Baringo', 'woocommerce' ),
            'KE02' => __( 'Bomet', 'woocommerce' ),
            'KE03' => __( 'Bungoma', 'woocommerce' ),
            'KE04' => __( 'Busia', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 3 days to fix
    i18n/states.php on lines 837..885

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

    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

        'IN' => array( // Indian states.
            'AP' => __( 'Andhra Pradesh', 'woocommerce' ),
            'AR' => __( 'Arunachal Pradesh', 'woocommerce' ),
            'AS' => __( 'Assam', 'woocommerce' ),
            'BR' => __( 'Bihar', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 2 days to fix
    i18n/states.php on lines 1096..1134

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

    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

        'NG' => array( // Nigerian provinces.
            'AB' => __( 'Abia', 'woocommerce' ),
            'FC' => __( 'Abuja', 'woocommerce' ),
            'AD' => __( 'Adamawa', 'woocommerce' ),
            'AK' => __( 'Akwa Ibom', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 2 days to fix
    i18n/states.php on lines 630..668

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

    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

        'DO' => array( // Dominican Republic.
            'DO-01' => __( 'Distrito Nacional', 'woocommerce' ),
            'DO-02' => __( 'Azua', 'woocommerce' ),
            'DO-03' => __( 'Baoruco', 'woocommerce' ),
            'DO-04' => __( 'Barahona', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 2 days to fix
    i18n/states.php on lines 272..305
    i18n/states.php on lines 1015..1048

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

    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

        'CN' => array( // Chinese states.
            'CN1'  => __( 'Yunnan / 云南', 'woocommerce' ),
            'CN2'  => __( 'Beijing / 北京', 'woocommerce' ),
            'CN3'  => __( 'Tianjin / 天津', 'woocommerce' ),
            'CN4'  => __( 'Hebei / 河北', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 2 days to fix
    i18n/states.php on lines 309..342
    i18n/states.php on lines 1015..1048

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

    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

        'MX' => array( // Mexico States.
            'DF' => __( 'Ciudad de México', 'woocommerce' ),
            'JA' => __( 'Jalisco', 'woocommerce' ),
            'NL' => __( 'Nuevo León', 'woocommerce' ),
            'AG' => __( 'Aguascalientes', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 2 days to fix
    i18n/states.php on lines 272..305
    i18n/states.php on lines 309..342

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

    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

        'BR' => array( // Brazillian states.
            'AC' => __( 'Acre', 'woocommerce' ),
            'AL' => __( 'Alagoas', 'woocommerce' ),
            'AP' => __( 'Amapá', 'woocommerce' ),
            'AM' => __( 'Amazonas', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 2 days to fix
    i18n/states.php on lines 394..422

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

    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

        'EG' => array( // Egypt states.
            'EGALX' => __( 'Alexandria', 'woocommerce' ),
            'EGASN' => __( 'Aswan', 'woocommerce' ),
            'EGAST' => __( 'Asyut', 'woocommerce' ),
            'EGBA'  => __( 'Red Sea', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 2 days to fix
    i18n/states.php on lines 200..228

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

    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

        'PE' => array( // Peru states.
            'CAL' => __( 'El Callao', 'woocommerce' ),
            'LMA' => __( 'Municipalidad Metropolitana de Lima', 'woocommerce' ),
            'AMA' => __( 'Amazonas', 'woocommerce' ),
            'ANC' => __( 'Ancash', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 1 day to fix
    i18n/states.php on lines 244..271
    i18n/states.php on lines 602..629

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

    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

        'CH' => array( // Cantons of Switzerland.
            'AG' => __( 'Aargau', 'woocommerce' ),
            'AR' => __( 'Appenzell Ausserrhoden', 'woocommerce' ),
            'AI' => __( 'Appenzell Innerrhoden', 'woocommerce' ),
            'BL' => __( 'Basel-Landschaft', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 1 day to fix
    i18n/states.php on lines 602..629
    i18n/states.php on lines 1171..1198

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

    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

        'IE' => array( // Republic of Ireland.
            'CW' => __( 'Carlow', 'woocommerce' ),
            'CN' => __( 'Cavan', 'woocommerce' ),
            'CE' => __( 'Clare', 'woocommerce' ),
            'CO' => __( 'Cork', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 1 day to fix
    i18n/states.php on lines 244..271
    i18n/states.php on lines 1171..1198

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

    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

        'LA' => array(
            'AT' => __( 'Attapeu', 'woocommerce' ),
            'BK' => __( 'Bokeo', 'woocommerce' ),
            'BL' => __( 'Bolikhamsai', 'woocommerce' ),
            'CH' => __( 'Champasak', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 1 day to fix
    i18n/states.php on lines 18..37
    i18n/states.php on lines 1300..1319

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

    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

        'AO' => array( // Angola states.
            'BGO' => __( 'Bengo', 'woocommerce' ),
            'BLU' => __( 'Benguela', 'woocommerce' ),
            'BIE' => __( 'Bié', 'woocommerce' ),
            'CAB' => __( 'Cabinda', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 1 day to fix
    i18n/states.php on lines 937..956
    i18n/states.php on lines 1300..1319

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

    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

        'PY' => array( // Paraguay states.
            'PY-ASU' => __( 'Asunción', 'woocommerce' ),
            'PY-1'   => __( 'Concepción', 'woocommerce' ),
            'PY-2'   => __( 'San Pedro', 'woocommerce' ),
            'PY-3'   => __( 'Cordillera', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 1 day to fix
    i18n/states.php on lines 18..37
    i18n/states.php on lines 937..956

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

    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

        'GH' => array( // Ghanaian Regions.
            'AF' => __( 'Ahafo', 'woocommerce' ),
            'AH' => __( 'Ashanti', 'woocommerce' ),
            'BA' => __( 'Brong-Ahafo', 'woocommerce' ),
            'BO' => __( 'Bono', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 1 day to fix
    includes/admin/settings/views/html-webhooks-edit.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 258.

    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

        'NZ' => array( // New Zealand States.
            'NL' => __( 'Northland', 'woocommerce' ),
            'AK' => __( 'Auckland', 'woocommerce' ),
            'WA' => __( 'Waikato', 'woocommerce' ),
            'BP' => __( 'Bay of Plenty', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 1 day to fix
    i18n/states.php on lines 1049..1066

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

    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

        'MY' => array( // Malaysian states.
            'JHR' => __( 'Johor', 'woocommerce' ),
            'KDH' => __( 'Kedah', 'woocommerce' ),
            'KTN' => __( 'Kelantan', 'woocommerce' ),
            'LBN' => __( 'Labuan', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 1 day to fix
    i18n/states.php on lines 1153..1170

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

    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

        'JM' => array( // Jamaica's Parishes. Ref: https://en.wikipedia.org/wiki/ISO_3166-2:JM.
            'JM-01' => __( 'Kingston', 'woocommerce' ),
            'JM-02' => __( 'Saint Andrew', 'woocommerce' ),
            'JM-03' => __( 'Saint Thomas', 'woocommerce' ),
            'JM-04' => __( 'Portland', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 6 hrs to fix
    i18n/states.php on lines 1080..1095
    i18n/states.php on lines 1137..1152

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

    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

        'NA' => array( // Namibia regions.
            'ER' => __( 'Erongo', 'woocommerce' ),
            'HA' => __( 'Hardap', 'woocommerce' ),
            'KA' => __( 'Karas', 'woocommerce' ),
            'KE' => __( 'Kavango East', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 6 hrs to fix
    i18n/states.php on lines 814..829
    i18n/states.php on lines 1137..1152

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

    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

        'NP' => array( // Nepal states (Zones).
            'BAG' => __( 'Bagmati', 'woocommerce' ),
            'BHE' => __( 'Bheri', 'woocommerce' ),
            'DHA' => __( 'Dhaulagiri', 'woocommerce' ),
            'GAN' => __( 'Gandaki', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 6 hrs to fix
    i18n/states.php on lines 814..829
    i18n/states.php on lines 1080..1095

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

    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

        'CA' => array( // Canadian states.
            'AB' => __( 'Alberta', 'woocommerce' ),
            'BC' => __( 'British Columbia', 'woocommerce' ),
            'MB' => __( 'Manitoba', 'woocommerce' ),
            'NB' => __( 'New Brunswick', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 5 hrs to fix
    i18n/states.php on lines 500..514

    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

        'GR' => array( // Greek Regions.
            'I' => __( 'Attica', 'woocommerce' ),
            'A' => __( 'East Macedonia and Thrace', 'woocommerce' ),
            'B' => __( 'Central Macedonia', 'woocommerce' ),
            'C' => __( 'West Macedonia', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 5 hrs to fix
    i18n/states.php on lines 229..243

    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

        'ZM' => array( // Zambia's Provinces. Ref: https://en.wikipedia.org/wiki/ISO_3166-2:ZM.
            'ZM-01' => __( 'Western', 'woocommerce' ),
            'ZM-02' => __( 'Central', 'woocommerce' ),
            'ZM-03' => __( 'Eastern', 'woocommerce' ),
            'ZM-04' => __( 'Luapula', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 3 hrs to fix
    includes/class-wc-privacy-exporters.php on lines 249..260

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

    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

        'BO' => array( // Bolivian states.
            'B' => __( 'Chuquisaca', 'woocommerce' ),
            'H' => __( 'Beni', 'woocommerce' ),
            'C' => __( 'Cochabamba', 'woocommerce' ),
            'L' => __( 'La Paz', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 2 hrs to fix
    i18n/states.php on lines 1728..1738
    i18n/states.php on lines 1797..1807

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

    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

        'ZA' => array( // South African states.
            'EC'  => __( 'Eastern Cape', 'woocommerce' ),
            'FS'  => __( 'Free State', 'woocommerce' ),
            'GP'  => __( 'Gauteng', 'woocommerce' ),
            'KZN' => __( 'KwaZulu-Natal', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 2 hrs to fix
    i18n/states.php on lines 189..199
    i18n/states.php on lines 1728..1738

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

    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

        'UM' => array(
            '81' => __( 'Baker Island', 'woocommerce' ),
            '84' => __( 'Howland Island', 'woocommerce' ),
            '86' => __( 'Jarvis Island', 'woocommerce' ),
            '67' => __( 'Johnston Atoll', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 2 other locations - About 2 hrs to fix
    i18n/states.php on lines 189..199
    i18n/states.php on lines 1797..1807

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

    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

        'PK' => array( // Pakistan's states.
            'JK' => __( 'Azad Kashmir', 'woocommerce' ),
            'BA' => __( 'Balochistan', 'woocommerce' ),
            'TA' => __( 'FATA', 'woocommerce' ),
            'GB' => __( 'Gilgit Baltistan', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 2 hrs to fix
    i18n/states.php on lines 65..74

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

    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

        'AU' => array( // Australian states.
            'ACT' => __( 'Australian Capital Territory', 'woocommerce' ),
            'NSW' => __( 'New South Wales', 'woocommerce' ),
            'NT'  => __( 'Northern Territory', 'woocommerce' ),
            'QLD' => __( 'Queensland', 'woocommerce' ),
    Severity: Major
    Found in i18n/states.php and 1 other location - About 2 hrs to fix
    i18n/states.php on lines 1287..1296

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

    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