qcubed/framework

View on GitHub
includes/tests/qcubed-unit/QQMathOpTest.php

Summary

Maintainability
F
6 days
Test Coverage

File QQMathOpTest.php has 336 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 *
 * @package Tests
 */
Severity: Minor
Found in includes/tests/qcubed-unit/QQMathOpTest.php - About 4 hrs to fix

    Method testExample has 78 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function testExample() {
            $objPersonArray = Person::QueryArray(
                /* Only return the persons who have AT LEAST ONE overdue project */
                QQ::GreaterThan(QQ::Sub(QQN::Person()->ProjectAsManager->Spent, QQN::Person()->ProjectAsManager->Budget), 20)
            );
    Severity: Major
    Found in includes/tests/qcubed-unit/QQMathOpTest.php - About 3 hrs to fix

      Method testSelect has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function testSelect() {
              $objTest = new TypeTest();
              $objTest->TestFloat = 1.0;
              $objTest->Save();
              
      Severity: Minor
      Found in includes/tests/qcubed-unit/QQMathOpTest.php - About 1 hr to fix

        Method testMathOp has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function testMathOp() {
                $objTest = new TypeTest();
                $objTest->TestFloat = 1.0;
                $objTest->Save();
                
        Severity: Minor
        Found in includes/tests/qcubed-unit/QQMathOpTest.php - About 1 hr to fix

          Function testSelect has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              public function testSelect() {
                  $objTest = new TypeTest();
                  $objTest->TestFloat = 1.0;
                  $objTest->Save();
                  
          Severity: Minor
          Found in includes/tests/qcubed-unit/QQMathOpTest.php - About 1 hr 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

          Method testOrderByDesc has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testOrderByDesc() {
                  $objTest = new TypeTest();
                  $objTest->TestFloat = 1.0;
                  $objTest->Save();
                  
          Severity: Minor
          Found in includes/tests/qcubed-unit/QQMathOpTest.php - About 1 hr to fix

            Method testOrderBy has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function testOrderBy() {
                    $objTest = new TypeTest();
                    $objTest->TestFloat = 1.0;
                    $objTest->Save();
                    
            Severity: Minor
            Found in includes/tests/qcubed-unit/QQMathOpTest.php - About 1 hr to fix

              Function testMathOp has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function testMathOp() {
                      $objTest = new TypeTest();
                      $objTest->TestFloat = 1.0;
                      $objTest->Save();
                      
              Severity: Minor
              Found in includes/tests/qcubed-unit/QQMathOpTest.php - About 55 mins 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

              Missing class import via use statement (line '63', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '159', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '109', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '217', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '180', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '24', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '136', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '67', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '86', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '90', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '184', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '132', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '155', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '221', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '20', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '113', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '254', column '18').
              Open

                      $objTest = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Missing class import via use statement (line '258', column '19').
              Open

                      $objTest2 = new TypeTest();

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Avoid using static access to class 'QQ' in method 'testSub'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterOrEqual(QQ::Sub(QQN::TypeTest()->TestFloat, 1.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testAdd'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Add(QQN::TypeTest()->TestFloat, 1.5), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderByDesc'.
              Open

                      QQ::Clause(
                          QQ::OrderBy(QQ::Virtual('mul1'), 'DESC')
                          , QQ::Expand(QQ::Virtual('mul1'))
                      ));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderByDesc'.
              Open

                          QQ::OrderBy(QQ::Virtual('mul1'), 'DESC')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::LessThan(
                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))
                          , -1.0
                      ),

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'Person' in method 'testExample'.
              Open

                      $objPersonArray = Person::QueryArray(
                          /* Only return the persons who have AT LEAST ONE overdue project */
                          QQ::GreaterThan(
                              QQ::Virtual('diff', QQ::Sub(
                                  QQN::Person()->ProjectAsManager->Spent

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'setUp'.
              Open

                      TypeTest::DeleteAll(); // prepare for test in case a test was interrupted and objects did not get deleted

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', 2.0, QQN::TypeTest()->TestFloat), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', QQN::TypeTest()->TestFloat, QQN::TypeTest()->TestFloat), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                          , QQ::Select(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::Virtual('diff', QQ::Sub(
                                  QQN::Person()->ProjectAsManager->Spent
                                  , QQN::Person()->ProjectAsManager->Budget
                              ))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              , QQ::Expand(QQ::Virtual('diff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testDiv'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Div(QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testAdd'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Add(QQN::TypeTest()->TestFloat, 1.5), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderBy'.
              Open

                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderBy'.
              Open

                          , QQ::Expand(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                      QQ::Clause(
                          QQ::OrderBy(QQ::Virtual('mul1'))
                          , QQ::Expand(QQ::Virtual('mul1'))
                          , QQ::Select(QQ::Virtual('mul1'))
                      ));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                          QQ::OrderBy(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                          , QQ::Expand(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                          , QQ::Expand(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              , QQ::Expand(QQ::Virtual('diff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::OrderBy(QQ::Virtual('absdiff'), 'DESC')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                                  QQ::Virtual('absdiff')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testMul'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Mul(QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderBy'.
              Open

                          QQ::OrderBy(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderBy'.
              Open

                          , QQ::Expand(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderByDesc'.
              Open

                          QQ::OrderBy(QQ::Virtual('mul1'), 'DESC')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              , QQ::Select(array(
                                  QQ::Virtual('diff')
                                  , QQN::Person()->FirstName
                                  , QQN::Person()->LastName
                              ))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testNeg'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Neg(QQN::TypeTest()->TestFloat), 1.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::OrderBy(QQ::Virtual('diff'), 'DESC')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testNeg'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Neg(QQN::TypeTest()->TestFloat), 1.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testOrderBy'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::LessThan(
                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))
                          , -1.0
                      ),
                      QQ::Clause(

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderBy'.
              Open

                      QQ::Clause(
                          QQ::OrderBy(QQ::Virtual('mul1'))
                          , QQ::Expand(QQ::Virtual('mul1'))
                      ));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderBy'.
              Open

                          QQ::OrderBy(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderByDesc'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::LessThan(
                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))
                          , -1.0
                      ),

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderByDesc'.
              Open

                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testSelect'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::LessThan(
                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))
                          , -1.0
                      ),
                      QQ::Clause(

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::OrderBy(QQ::Virtual('diff'), 'DESC')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                                  QQ::Sub(
                                      QQN::Person()->ProjectAsManager->Spent
                                      , QQN::Person()->ProjectAsManager->Budget
                                  )

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderByDesc'.
              Open

                          , QQ::Expand(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::OrderBy(QQ::Virtual('diff'), 'DESC')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::OrderBy(QQ::Virtual('diff'), 'DESC')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testMul'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Mul(QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testSub'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterOrEqual(QQ::Sub(QQN::TypeTest()->TestFloat, 1.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderBy'.
              Open

                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::Virtual('absdiff', QQ::Abs(
                                  QQ::Sub(
                                      QQN::Person()->ProjectAsManager->Spent
                                      , QQN::Person()->ProjectAsManager->Budget
                                  )

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testDiv'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Div(QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderBy'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::LessThan(
                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))
                          , -1.0
                      ),

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              , QQ::Expand(QQ::Virtual('diff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                          QQ::GreaterThan(
                              QQ::Virtual('absdiff', QQ::Abs(
                                  QQ::Sub(
                                      QQN::Person()->ProjectAsManager->Spent
                                      , QQN::Person()->ProjectAsManager->Budget

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testAdd'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Add(QQN::TypeTest()->TestFloat, 1.5), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                          QQ::OrderBy(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                          , QQ::Select(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                          QQ::Clause(
                              /* The most overdue first */
                              QQ::OrderBy(QQ::Virtual('diff'), 'DESC')
                              /* Required to access this field with GetVirtualAttribute */
                              , QQ::Expand(QQ::Virtual('diff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'Person' in method 'testExample'.
              Open

                      $objPersonArray = Person::QueryArray(
                          /* Only return the persons who have AT LEAST ONE overdue project */
                          QQ::GreaterThan(
                              QQ::Virtual('absdiff', QQ::Abs(
                                  QQ::Sub(

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                          QQ::Clause(
                              /* The most overdue first */
                              QQ::OrderBy(QQ::Virtual('absdiff'), 'DESC')
                              /* Required to access this field with GetVirtualAttribute */
                              , QQ::Expand(QQ::Virtual('absdiff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              , QQ::Expand(QQ::Virtual('absdiff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              , QQ::Select(array(
                                  QQ::Virtual('absdiff')
                                  , QQN::Person()->FirstName
                                  , QQN::Person()->LastName
                              ))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testMul'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Mul(QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSub'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterOrEqual(QQ::Sub(QQN::TypeTest()->TestFloat, 1.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                          QQ::GreaterThan(QQ::Sub(QQN::Person()->ProjectAsManager->Spent, QQN::Person()->ProjectAsManager->Budget), 20)

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                          QQ::GreaterThan(QQ::Sub(QQN::Person()->ProjectAsManager->Spent, QQN::Person()->ProjectAsManager->Budget), 20)

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', 2.0, QQN::TypeTest()->TestFloat), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::Virtual('diff', QQ::Sub(
                                  QQN::Person()->ProjectAsManager->Spent
                                  , QQN::Person()->ProjectAsManager->Budget
                              ))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              , QQ::Expand(QQ::Virtual('diff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::Virtual('absdiff', QQ::Abs(
                                  QQ::Sub(
                                      QQN::Person()->ProjectAsManager->Spent
                                      , QQN::Person()->ProjectAsManager->Budget
                                  )

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::OrderBy(QQ::Virtual('absdiff'), 'DESC')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testDiv'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Div(QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testOrderByDesc'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::LessThan(
                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))
                          , -1.0
                      ),
                      QQ::Clause(

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                          QQ::Clause(
                              /* The most overdue first */
                              QQ::OrderBy(QQ::Virtual('diff'), 'DESC')
                              /* Required to access this field with GetVirtualAttribute */
                              , QQ::Expand(QQ::Virtual('diff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'Person' in method 'testExample'.
              Open

                      $objPersonArray = Person::QueryArray(
                          /* Only return the persons who have AT LEAST ONE overdue project */
                          QQ::GreaterThan(
                              QQ::Virtual('diff', QQ::MathOp(
                                  '-', // Note the minus operation sign here

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                          QQ::GreaterThan(
                              QQ::Virtual('diff', QQ::MathOp(
                                  '-', // Note the minus operation sign here
                                  QQN::Person()->ProjectAsManager->Spent
                                  , QQN::Person()->ProjectAsManager->Budget

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', QQN::TypeTest()->TestFloat, QQN::TypeTest()->TestFloat), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::Virtual('diff', QQ::MathOp(
                                  '-', // Note the minus operation sign here
                                  QQN::Person()->ProjectAsManager->Spent
                                  , QQN::Person()->ProjectAsManager->Budget
                              ))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderByDesc'.
              Open

                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testOrderByDesc'.
              Open

                          , QQ::Expand(QQ::Virtual('mul1'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', QQN::TypeTest()->TestFloat, 2.0), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testSelect'.
              Open

                          QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', 2.0, QQN::TypeTest()->TestFloat), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              QQ::Virtual('diff', QQ::MathOp(
                                  '-', // Note the minus operation sign here
                                  QQN::Person()->ProjectAsManager->Spent
                                  , QQN::Person()->ProjectAsManager->Budget
                              ))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'TypeTest' in method 'testMathOp'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::MathOp('*', QQN::TypeTest()->TestFloat, QQN::TypeTest()->TestFloat), 3.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testNeg'.
              Open

                      $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Neg(QQN::TypeTest()->TestFloat), 1.0));

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'Person' in method 'testExample'.
              Open

                      $objPersonArray = Person::QueryArray(
                          /* Only return the persons who have AT LEAST ONE overdue project */
                          QQ::GreaterThan(QQ::Sub(QQN::Person()->ProjectAsManager->Spent, QQN::Person()->ProjectAsManager->Budget), 20)
                      );

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                          QQ::GreaterThan(
                              QQ::Virtual('diff', QQ::Sub(
                                  QQN::Person()->ProjectAsManager->Spent
                                  , QQN::Person()->ProjectAsManager->Budget
                              ))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                                  QQ::Virtual('diff')

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

              Avoid using static access to class 'QQ' in method 'testExample'.
              Open

                              , QQ::Expand(QQ::Virtual('absdiff'))

              StaticAccess

              Since: 1.4.0

              Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

              Example

              class Foo
              {
                  public function bar()
                  {
                      Bar::baz();
                  }
              }

              Source https://phpmd.org/rules/cleancode.html#staticaccess

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

                  public function testNeg() {
                      $objTest = new TypeTest();
                      $objTest->TestFloat = -1.0;
                      $objTest->Save();
              
              
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 1 other location - About 5 hrs to fix
              includes/tests/qcubed-unit/QQFuncTest.php on lines 40..61

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

              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 testMul() {
                      $objTest = new TypeTest();
                      $objTest->TestFloat = 1.0;
                      $objTest->Save();
                      
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 3 other locations - About 4 hrs to fix
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 85..106
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 108..129
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 131..152

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

              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 testAdd() {
                      $objTest = new TypeTest();
                      $objTest->TestFloat = 1.0;
                      $objTest->Save();
                      
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 3 other locations - About 4 hrs to fix
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 62..83
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 85..106
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 108..129

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

              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 testSub() {
                      $objTest = new TypeTest();
                      $objTest->TestFloat = 2.0;
                      $objTest->Save();
                      
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 3 other locations - About 4 hrs to fix
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 62..83
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 85..106
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 131..152

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

              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 testDiv() {
                      $objTest = new TypeTest();
                      $objTest->TestFloat = 4.0;
                      $objTest->Save();
                      
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 3 other locations - About 4 hrs to fix
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 62..83
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 108..129
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 131..152

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

              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

                      $objPersonArray = Person::QueryArray(
                          /* Only return the persons who have AT LEAST ONE overdue project */
                          QQ::GreaterThan(
                              QQ::Virtual('absdiff', QQ::Abs(
                                  QQ::Sub(
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 1 other location - About 3 hrs to fix
              assets/php/examples/qcubed_query/qqfuncnmath.php on lines 126..148

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

              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

                      if (2 == count($objResArray)) {
                          $objRes = $objResArray[0];
                          $this->assertNotNull($objRes);
                          if ($objRes) {
                              $this->assertEquals(1.0, $objRes->TestFloat);
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 1 other location - About 2 hrs to fix
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 197..210

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

              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

                      if (2 == count($objResArray)) {
                          $objRes = $objResArray[0];
                          $this->assertNotNull($objRes);
                          if ($objRes) {
                              $this->assertEquals(2.0, $objRes->TestFloat);
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 1 other location - About 2 hrs to fix
              includes/tests/qcubed-unit/QQMathOpTest.php on lines 234..247

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

              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

                      $objPersonArray = Person::QueryArray(
                          /* Only return the persons who have AT LEAST ONE overdue project */
                          QQ::GreaterThan(
                              QQ::Virtual('diff', QQ::Sub(
                                  QQN::Person()->ProjectAsManager->Spent
              Severity: Major
              Found in includes/tests/qcubed-unit/QQMathOpTest.php and 1 other location - About 1 hr to fix
              assets/php/examples/qcubed_query/qqfuncnmath.php on lines 61..76

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

              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