civictechro/website-alba-iulia-smart-city

View on GitHub
site/web/app/mu-plugins/SmartCityThemeSetup.php

Summary

Maintainability
F
2 wks
Test Coverage

Method registerCustomFieldGroups has 1038 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private function registerCustomFieldGroups(): void {
    if( function_exists('acf_add_local_field_group') ):

    // Homepage
    acf_add_local_field_group(array(
Severity: Major
Found in site/web/app/mu-plugins/SmartCityThemeSetup.php - About 5 days to fix

    File SmartCityThemeSetup.php has 1324 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Plugin Name: Smart City Theme Setup
     * Description: Configurează WordPress pentru tema Smart City.
     * Plugin URI: https://github.com/civictechro
    Severity: Major
    Found in site/web/app/mu-plugins/SmartCityThemeSetup.php - About 3 days to fix

      Method registerCustomPostTypes has 187 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        private function registerCustomPostTypes(): void {
      
          register_post_type(
            AppConstants::POST_TYPE_DOCUMENT,
            array(
      Severity: Major
      Found in site/web/app/mu-plugins/SmartCityThemeSetup.php - About 7 hrs to fix

        Method registerCustomMetaBoxes has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          private function registerCustomMetaBoxes(): void {
            $custom_boxes_init = function() {
              $project_gallery = new_cmb2_box(array(
                'id' => AppConstants::PROJECT_GALLERY_METABOX,
                'title' => __('Galerie Foto', 'cmb2'),
        Severity: Major
        Found in site/web/app/mu-plugins/SmartCityThemeSetup.php - About 2 hrs to fix

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

              acf_add_local_field_group(array(
                'key' => 'group_5a80af3fad689',
                'title' => 'Etapă proiect',
                'fields' => array(
                  array(
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 1 other location - About 5 hrs to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1173..1219

          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

              acf_add_local_field_group(array(
                'key' => 'group_5a80af3fad6b7',
                'title' => 'Etichetă proiect',
                'fields' => array(
                  array(
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 1 other location - About 5 hrs to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1329..1375

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

              register_post_type(
                AppConstants::POST_TYPE_VERTICAL,
                array(
                  'labels' => array(
                    'name' => __('Verticale'),
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 4 other locations - About 3 hrs to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 219..237
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 239..257
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 279..297
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 299..317

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

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

              register_post_type(
                AppConstants::POST_TYPE_PROJECT_LABEL,
                array(
                  'labels' => array(
                    'name' => __('Etichete proiect'),
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 4 other locations - About 3 hrs to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 219..237
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 259..277
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 279..297
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 299..317

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

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

              register_post_type(
                AppConstants::POST_TYPE_PROJECT_STATUS,
                array(
                  'labels' => array(
                    'name' => __('Etape proiect'),
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 4 other locations - About 3 hrs to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 219..237
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 239..257
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 259..277
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 299..317

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

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

              register_post_type(
                AppConstants::POST_TYPE_LINKS,
                array(
                  'labels' => array(
                    'name' => __('Link-uri utile'),
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 4 other locations - About 3 hrs to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 219..237
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 239..257
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 259..277
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 279..297

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

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

              register_post_type(
                AppConstants::POST_TYPE_COMPANY,
                array(
                  'labels' => array(
                    'name' => __('Companii'),
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 4 other locations - About 3 hrs to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 239..257
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 259..277
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 279..297
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 299..317

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

          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

                  array(
                          'key' => 'field_5a9a5ec18d132',
                          'label' => 'Verticală',
                          'name' => 'verticala',
                          'type' => 'relationship',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 1 other location - About 1 hr to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 807..832

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

          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

                  array(
                    'key' => 'field_5a9a5ec18d131',
                    'label' => 'Etapă implementare',
                    'name' => 'etapa_implementare',
                    'type' => 'relationship',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 1 other location - About 1 hr to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 833..858

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

          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

                      array(
                          'key' => 'field_5a80ade76dfaf',
                          'label' => 'Logo companie',
                          'name' => 'logo',
                          'type' => 'image',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 1 other location - About 1 hr to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1267..1290

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 110.

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

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

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

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

          Refactorings

          Further Reading

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

                  array(
                      'key' => 'field_5b42ba0be71fa',
                      'label' => 'Pictograma',
                      'name' => 'pictograma_upload',
                      'type' => 'image',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 1 other location - About 1 hr to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 687..710

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 110.

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

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

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

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

          Refactorings

          Further Reading

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

                  array(
                          'key' => 'field_5a9a5ec18d137',
                          'label' => 'Etichete',
                          'name' => 'etichete',
                          'type' => 'relationship',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 2 other locations - About 1 hr to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 904..929
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 930..955

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

          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

                  array(
                          'key' => 'field_5a9a5ec18d139',
                          'label' => 'Partener',
                          'name' => 'partener',
                          'type' => 'relationship',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 2 other locations - About 1 hr to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 878..903
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 904..929

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

          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

                  array(
                          'key' => 'field_5a9a5ec18d138',
                          'label' => 'Furnizori',
                          'name' => 'furnizori',
                          'type' => 'relationship',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 2 other locations - About 1 hr to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 878..903
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 930..955

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

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

                  array(
                          'key' => 'field_5a9d6883de9fb',
                          'label' => 'Valoare statistica 1',
                          'name' => 'valoare_statistica_1',
                          'type' => 'number',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 3 other locations - About 45 mins to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 474..494
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 495..515
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1110..1130

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

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

                      array(
                          'key' => 'field_5a9d222223de9fb',
                          'label' => 'Mărime document (în Mb)',
                          'name' => 'document_weight',
                          'type' => 'number',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 3 other locations - About 45 mins to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 474..494
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1070..1090
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1110..1130

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

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

                      array(
                          'key' => 'field_5a9d11113de9fb',
                          'label' => 'Număr de pagini',
                          'name' => 'page_count',
                          'type' => 'number',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 3 other locations - About 45 mins to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 495..515
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1070..1090
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1110..1130

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

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

                  array(
                          'key' => 'field_5a9d6883de9fc',
                          'label' => 'Valoare statistica 2',
                          'name' => 'valoare_statistica_2',
                          'type' => 'number',
          Severity: Major
          Found in site/web/app/mu-plugins/SmartCityThemeSetup.php and 3 other locations - About 45 mins to fix
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 474..494
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 495..515
          site/web/app/mu-plugins/SmartCityThemeSetup.php on lines 1070..1090

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

          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