.dev/tests/unit/db/class_db_offline_query_builder_test.Test.php

Summary

Maintainability
F
1 mo
Test Coverage

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

<?php

require_once __DIR__ . '/db_offline_abstract.php';

/**
Severity: Major
Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 4 days to fix

    class_db_offline_query_builder_test has 58 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class class_db_offline_query_builder_test extends db_offline_abstract
    {
        public function test_select_star()
        {
            if ($this->_need_skip_test(__FUNCTION__)) {
    Severity: Major
    Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 day to fix

      Method test_whereid has 101 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function test_whereid()
          {
              if ($this->_need_skip_test(__FUNCTION__)) {
                  return;
              }
      Severity: Major
      Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 4 hrs to fix

        Method test_where_basic has 76 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function test_where_basic()
            {
                if ($this->_need_skip_test(__FUNCTION__)) {
                    return;
                }
        Severity: Major
        Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 3 hrs to fix

          Method test_where_in has 71 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function test_where_in()
              {
                  if ($this->_need_skip_test(__FUNCTION__)) {
                      return;
                  }
          Severity: Major
          Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 2 hrs to fix

            Method test_order_by has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function test_order_by()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Major
            Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 2 hrs to fix

              Method test_decrement has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function test_decrement()
                  {
                      if ($this->_need_skip_test(__FUNCTION__)) {
                          return;
                      }
              Severity: Major
              Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 2 hrs to fix

                Method test_increment has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function test_increment()
                    {
                        if ($this->_need_skip_test(__FUNCTION__)) {
                            return;
                        }
                Severity: Major
                Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 2 hrs to fix

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

                      public function test_join()
                      {
                          if ($this->_need_skip_test(__FUNCTION__)) {
                              return;
                          }
                  Severity: Major
                  Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 2 hrs to fix

                    Method test_select_complex has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function test_select_complex()
                        {
                            if ($this->_need_skip_test(__FUNCTION__)) {
                                return;
                            }
                    Severity: Minor
                    Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                      Method test_where_like has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function test_where_like()
                          {
                              if ($this->_need_skip_test(__FUNCTION__)) {
                                  return;
                              }
                      Severity: Minor
                      Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                        Method test_from has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function test_from()
                            {
                                if ($this->_need_skip_test(__FUNCTION__)) {
                                    return;
                                }
                        Severity: Minor
                        Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                          Method test_where_simplified_syntax has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function test_where_simplified_syntax()
                              {
                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                      return;
                                  }
                          Severity: Minor
                          Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                            Method test_update_batch has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function test_update_batch()
                                {
                                    if ($this->_need_skip_test(__FUNCTION__)) {
                                        return;
                                    }
                            Severity: Minor
                            Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                              Method test_select_aggregates has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function test_select_aggregates()
                                  {
                                      if ($this->_need_skip_test(__FUNCTION__)) {
                                          return;
                                      }
                              Severity: Minor
                              Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                Method test_delete has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function test_delete()
                                    {
                                        if ($this->_need_skip_test(__FUNCTION__)) {
                                            return;
                                        }
                                Severity: Minor
                                Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                  Method test_min has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function test_min()
                                      {
                                          if ($this->_need_skip_test(__FUNCTION__)) {
                                              return;
                                          }
                                  Severity: Minor
                                  Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                    Method test_max has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function test_max()
                                        {
                                            if ($this->_need_skip_test(__FUNCTION__)) {
                                                return;
                                            }
                                    Severity: Minor
                                    Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                      Method test_sum has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function test_sum()
                                          {
                                              if ($this->_need_skip_test(__FUNCTION__)) {
                                                  return;
                                              }
                                      Severity: Minor
                                      Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                        Method test_avg has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function test_avg()
                                            {
                                                if ($this->_need_skip_test(__FUNCTION__)) {
                                                    return;
                                                }
                                        Severity: Minor
                                        Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                          Method test_select_check_wrong_input has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              public function test_select_check_wrong_input()
                                              {
                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                      return;
                                                  }
                                          Severity: Minor
                                          Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                            Method test_group_by has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                public function test_group_by()
                                                {
                                                    if ($this->_need_skip_test(__FUNCTION__)) {
                                                        return;
                                                    }
                                            Severity: Minor
                                            Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                              Method test_select_star has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  public function test_select_star()
                                                  {
                                                      if ($this->_need_skip_test(__FUNCTION__)) {
                                                          return;
                                                      }
                                              Severity: Minor
                                              Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                                Method test_having has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    public function test_having()
                                                    {
                                                        if ($this->_need_skip_test(__FUNCTION__)) {
                                                            return;
                                                        }
                                                Severity: Minor
                                                Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                                  Method test_count has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      public function test_count()
                                                      {
                                                          $this->assertFalse(
                                                              self::qb()->count(null, $sql = true)
                                                          );
                                                  Severity: Minor
                                                  Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                                    Method test_limit has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        public function test_limit()
                                                        {
                                                            if ($this->_need_skip_test(__FUNCTION__)) {
                                                                return;
                                                            }
                                                    Severity: Minor
                                                    Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                                      Method test_update has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          public function test_update()
                                                          {
                                                              if ($this->_need_skip_test(__FUNCTION__)) {
                                                                  return;
                                                              }
                                                      Severity: Minor
                                                      Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

                                                        Method test_where_or has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            public function test_where_or()
                                                            {
                                                                if ($this->_need_skip_test(__FUNCTION__)) {
                                                                    return;
                                                                }
                                                        Severity: Minor
                                                        Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

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

                                                              public function test_decrement()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1029..1094

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

                                                          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

                                                              public function test_increment()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1095..1160

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

                                                          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

                                                              public function test_min()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1161..1195
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1231..1265
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1266..1300

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

                                                          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

                                                              public function test_avg()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1196..1230
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1231..1265
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1266..1300

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

                                                          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

                                                              public function test_sum()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1161..1195
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1196..1230
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1231..1265

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

                                                          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

                                                              public function test_max()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1161..1195
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1196..1230
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1266..1300

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

                                                          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

                                                              public function test_where_exists()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1640..1650

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

                                                          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

                                                              public function test_union()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1592..1602

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

                                                          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

                                                              public function test_union_all()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1581..1591

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

                                                          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

                                                              public function test_where_not_exists()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 1629..1639

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

                                                          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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` AS `u` , `' . DB_PREFIX . 'articles` AS `a` , `' . DB_PREFIX . 'products` AS `p` , `' . DB_PREFIX . 'orders` AS `o` , `' . DB_PREFIX . 'rating` AS `r`',
                                                                      self::qb()->select()->from('user as u, articles as a', ['products' => 'p', 'orders' => 'o'], 'rating as r')->sql()
                                                                  );
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 273..276

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

                                                          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

                                                              public function test_where_null()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 720..733

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

                                                          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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` AS `u` , `' . DB_PREFIX . 'articles` AS `a` , `' . DB_PREFIX . 'products` AS `p` , `' . DB_PREFIX . 'orders` AS `o` , `' . DB_PREFIX . 'rating` AS `r`',
                                                                      self::qb()->select()->table('user as u, articles as a', ['products' => 'p', 'orders' => 'o'], 'rating as r')->sql()
                                                                  );
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 258..261

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

                                                          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

                                                              public function test_where_raw()
                                                              {
                                                                  if ($this->_need_skip_test(__FUNCTION__)) {
                                                                      return;
                                                                  }
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 476..489

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

                                                          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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` AS `u` WHERE `u`.`id` = \'1\' GROUP BY `u`.`gid` HAVING `u`.`gid` = \'4\' ORDER BY `u`.`id` ASC LIMIT 20, 5',
                                                                      self::qb()->from(['user' => 'u'])->where(['u.id', '=', 1])->group_by('u.gid')->having(['u.gid', '=', 4])->order_by('u.id')->limit(5, 20)->sql()
                                                                  );
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 979..982
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 983..986

                                                          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

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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` AS `u` WHERE `u`.`id` = \'1\' GROUP BY `u`.`gid` HAVING `u`.`gid` = \'4\' ORDER BY `u`.`id` ASC LIMIT 20, 5',
                                                                      self::qb()->from(['user' => 'u'])->where(['u.id', '=', 1])->group_by('u.gid')->having(['u.gid', '=', 4])->order_by('u.id')->limit(5, 20)->sql()
                                                                  );
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 968..971
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 979..982

                                                          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

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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` AS `u` WHERE `u`.`id` = \'1\' GROUP BY `u`.`gid` HAVING `u`.`gid` = \'4\' ORDER BY `u`.`id` ASC LIMIT 20, 5',
                                                                      self::qb()->from(['user' => 'u'])->where(['u.id', '=', 1])->group_by('u.gid')->having(['u.gid', '=', 4])->order_by('u.id')->limit(5, 20)->sql()
                                                                  );
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 968..971
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 983..986

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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` WHERE `id` = \'2\' AND `gid` = \'1\' AND `sid` = \'3\' AND `pid` = \'4\' AND `hid` = \'5\' AND `mid` = \'6\' AND `rank` IS NULL',
                                                                      self::qb()->from('user')->where('id = 2', ['gid', 1], ['sid', '=', '3'], ['pid' => 4, 'hid' => 5, 'mid' => 6], ['rank', 'IS NULL'])->sql()
                                                                  );
                                                          Severity: Minor
                                                          Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php and 1 other location - About 40 mins to fix
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 707..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 94.

                                                          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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` AS `u` WHERE `u`.`id` = \'1\' OR `u`.`gid` > \'2\' OR `u`.`name` LIKE \'%hello%\' OR `u`.`pid` = \'4\' OR `u`.`hid` = \'5\' OR `u`.`mid` = \'6\' OR `u`.`id` IS NULL',
                                                                      self::qb()->from('user as u')->where_or(['u.id', 1], 'u.gid > 2', ['u.name', 'like', '*hello*'], ['u.pid' => 4, 'u.hid' => 5, 'u.mid' => 6], ['u.id', 'IS NULL'])->sql()
                                                                  );
                                                          Severity: Minor
                                                          Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php and 1 other location - About 40 mins to fix
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 711..714

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

                                                          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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` AS `u` WHERE `u`.`id` = \'1\' AND `u`.`gid` > \'2\' AND `u`.`name` LIKE \'%hello%\' AND `u`.`pid` = \'4\' AND `u`.`hid` = \'5\' AND `u`.`mid` = \'6\' AND `u`.`id` IS NULL',
                                                                      self::qb()->from('user as u')->where(['u.id', 1], 'u.gid > 2', ['u.name', 'like', '*hello*'], ['u.pid' => 4, 'u.hid' => 5, 'u.mid' => 6], ['u.id', 'IS NULL'])->sql()
                                                                  );
                                                          Severity: Minor
                                                          Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php and 1 other location - About 40 mins to fix
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 715..718

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

                                                          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

                                                                  $this->assertEquals(
                                                                      'SELECT * FROM `' . DB_PREFIX . 'user` WHERE `id` = \'2\' OR `gid` = \'1\' OR `sid` = \'3\' OR `pid` = \'4\' OR `hid` = \'5\' OR `mid` = \'6\' OR `rank` IS NULL',
                                                                      self::qb()->from('user')->where_or('id = 2', ['gid', 1], ['sid', '=', '3'], ['pid' => 4, 'hid' => 5, 'mid' => 6], ['rank', 'IS NULL'])->sql()
                                                                  );
                                                          Severity: Minor
                                                          Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php and 1 other location - About 40 mins to fix
                                                          .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php on lines 703..706

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

                                                          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