Showing 4,217 of 4,217 total issues

File yf_db.class.php has 1493 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * Database abstraction layer.
 *
Severity: Major
Found in plugins/db/classes/yf_db.class.php - About 3 days to fix

    File languages.data.php has 1475 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    return [
      0 => [
        'code' => 'aa',
    Severity: Major
    Found in plugins/locale/share/db/data/languages.data.php - About 3 days to fix

      File languages.php has 1475 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      $data = [
        'ab' => [
          'code' => 'ab',
      Severity: Major
      Found in .dev/scripts/languages/languages.php - About 3 days to fix

        File yf_manage_shop_import_products2.class.php has 1473 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        /*
            # addon select: supplier_id
        
        

          Function _filter_array has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring.
          Open

              public function _filter_array(&$data, $filter = [], $filter_params = [], $table = null)
              {
                  if ( ! $data || ! $filter) {
                      return false;
                  }
          Severity: Minor
          Found in plugins/table2/classes/table2/yf_table2_filter.class.php - About 3 days to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          File yf_debug.class.php has 1386 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /**
           * Debug console.
           *
          Severity: Major
          Found in classes/yf_debug.class.php - About 3 days to fix

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

            <?php
            
            return [
                'fields' => [
                    'id' => [
            plugins/shop/share/db/sql_php/shop_category_revisions.sql_php.php on lines 1..116
            plugins/shop/share/db/sql_php/shop_order_revisions.sql_php.php on lines 1..116

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

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

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

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

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

            Refactorings

            Further Reading

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

            <?php
            
            return [
                'fields' => [
                    'id' => [
            plugins/shop/share/db/sql_php/shop_order_revisions.sql_php.php on lines 1..116
            plugins/shop/share/db/sql_php/shop_product_revisions.sql_php.php on lines 1..116

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

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

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

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

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

            Refactorings

            Further Reading

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

            <?php
            
            return [
                'fields' => [
                    'id' => [
            plugins/shop/share/db/sql_php/shop_category_revisions.sql_php.php on lines 1..116
            plugins/shop/share/db/sql_php/shop_product_revisions.sql_php.php on lines 1..116

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

            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

            File class_db_real_utils_mysql_test.Test.php has 1343 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            require_once __DIR__ . '/db_real_abstract.php';
            
            /**
            Severity: Major
            Found in .dev/tests/functional/db/class_db_real_utils_mysql_test.Test.php - About 3 days to fix

              yf_form2 has 165 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class yf_form2
              {
                  public $CLASS_FORM_MAIN = 'form-horizontal';// col-md-6'
                  public $CLASS_FORM_CONTROL = 'form-control';
                  public $CLASS_CKEDITOR = 'ckeditor';
              Severity: Major
              Found in plugins/form2/classes/yf_form2.class.php - About 3 days to fix

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

                    public function _recursive_get_methods_from_extends($file_text = '', $user_module_name = '', $_type = 'admin', $ONLY_PRIVATE_METHODS = false)
                    {
                        $extends_file_path = '';
                        $methods = [];
                        // TODO: connect plugins
                plugins/admin/admin_modules/yf_admin_modules.class.php on lines 364..416

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

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

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

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

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

                Refactorings

                Further Reading

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

                    public function _recursive_get_methods_from_extends($file_text = '', $user_module_name = '', $_type = 'admin', $ONLY_PRIVATE_METHODS = false)
                    {
                        $extends_file_path = '';
                        $methods = [];
                        // TODO: connect plugins
                Severity: Major
                Found in plugins/admin/admin_modules/yf_admin_modules.class.php and 1 other location - About 3 days to fix
                plugins/sys/classes/core_api/yf_core_api_admin_modules.class.php on lines 249..301

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

                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

                File class_validate_test.Test.php has 1212 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                require_once __DIR__ . '/yf_unit_tests_setup.php';
                
                class class_validate_test extends yf\tests\wrapper
                Severity: Major
                Found in .dev/tests/unit/class_validate_test.Test.php - About 3 days to fix

                  File yf_payment_api__provider_webmoney.class.php has 1210 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  _class('payment_api__provider_remote');
                  
                  class yf_payment_api__provider_webmoney extends yf_payment_api__provider_remote
                  Severity: Major
                  Found in plugins/payment/classes/yf_payment_api__provider_webmoney.class.php - About 3 days to fix

                    File yf_payment_api__provider_interkassa.class.php has 1208 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    _class('payment_api__provider_remote');
                    
                    class yf_payment_api__provider_interkassa extends yf_payment_api__provider_remote
                    Severity: Major
                    Found in plugins/payment/classes/yf_payment_api__provider_interkassa.class.php - About 3 days to fix

                      yf_manage_shop has 147 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class yf_manage_shop
                      {
                          /** @var bool Filter on/off */
                          public $USE_FILTER = true;
                          /** @var string Folder where product's images store */
                      Severity: Major
                      Found in plugins/shop/admin_modules/yf_manage_shop.class.php - About 2 days to fix

                        File yf_payment_api__provider_remote.class.php has 1120 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        if ( ! function_exists('array_replace_recursive')) {
                            trigger_error('Not exists function "array_replace_recursive ( PHP 5 >= 5.3.0 )"', E_USER_ERROR);
                        }
                        Severity: Major
                        Found in plugins/payment/classes/yf_payment_api__provider_remote.class.php - About 2 days to fix

                          File yf_payment_api__provider_payeer.class.php has 1119 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          _class('payment_api__provider_remote');
                          
                          class yf_payment_api__provider_payeer extends yf_payment_api__provider_remote
                          Severity: Major
                          Found in plugins/payment/classes/yf_payment_api__provider_payeer.class.php - About 2 days to fix

                            File yf_common.class.php has 1115 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            
                            /**
                             * Class where most common used functions are stored.
                             *
                            Severity: Major
                            Found in plugins/common/classes/yf_common.class.php - About 2 days to fix
                              Severity
                              Category
                              Status
                              Source
                              Language