qcubed/framework

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

Summary

Maintainability
F
4 days
Test Coverage

File QQFuncTest.php has 258 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

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

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

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

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

          Method testMod has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testMod() {
                  $objTest = new TypeTest();
                  $objTest->TestInt = 11;
                  $objTest->Save();
                  
          Severity: Minor
          Found in includes/tests/qcubed-unit/QQFuncTest.php - About 1 hr to fix

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

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

            Function testMod has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function testMod() {
                    $objTest = new TypeTest();
                    $objTest->TestInt = 11;
                    $objTest->Save();
                    
            Severity: Minor
            Found in includes/tests/qcubed-unit/QQFuncTest.php - About 25 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 '22', 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 '41', 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 '45', 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 '87', 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 '226', 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 '143', 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 '147', 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 '114', 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 '230', 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 '263', 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 '68', 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 '91', 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 '18', 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 '64', 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 '166', 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 '189', 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 '110', 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 '267', 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 '170', 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 '193', 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 'testSqrt'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Sqrt(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 'testOrderBy'.
            Open

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

            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('power2'), false)

            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 'testMod'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Mod(QQN::TypeTest()->TestInt, 10), 2));

            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('power2', QQ::Power(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('power2'))

            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 'testMod'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Mod(QQN::TypeTest()->TestInt, 10), 1));

            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::GreaterThan(
                        QQ::Virtual('power2', QQ::Power(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 'testSelect'.
            Open

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

            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::GreaterThan(
                        QQ::Virtual('power2', QQ::Power(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 'testFunc'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Func('ABS', 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 'testAbs'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Abs(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 'testMod'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Mod(QQN::TypeTest()->TestInt, 10), 2));

            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 'testSqrt'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Sqrt(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 'TypeTest' in method 'testOrderBy'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::GreaterThan(
                        QQ::Virtual('power2', QQ::Power(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 'testMod'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Mod(QQN::TypeTest()->TestInt, 10), 1));

            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::GreaterThan(
                        QQ::Virtual('power2', QQ::Power(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 'testAbs'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Abs(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 'testCeil'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Ceil(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('power2'))

            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('power2'), false)

            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('power2'))

            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 'testMod'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Mod(QQN::TypeTest()->TestInt, 10), 2));

            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('power2', QQ::Power(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 'testSelect'.
            Open

                        QQ::Virtual('power2', QQ::Power(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 'testSelect'.
            Open

                        QQ::OrderBy(QQ::Virtual('power2'))

            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 'testFloor'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Floor(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::OrderBy(QQ::Virtual('power2'))

            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('power2'))

            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 'testAbs'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Abs(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 'testPower'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Power(QQN::TypeTest()->TestFloat, 2), 9.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::Clause(
                        QQ::OrderBy(QQ::Virtual('power2'))
                        , QQ::Expand(QQ::Virtual('power2'))
                        , QQ::Select(QQ::Virtual('power2'))
                    ));

            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('power2'))

            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 'testFloor'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Floor(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::OrderBy(QQ::Virtual('power2'))

            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('power2'))

            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 'testSqrt'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Sqrt(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 'testOrderBy'.
            Open

                        QQ::Virtual('power2', QQ::Power(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 'testFunc'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Func('ABS', 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 'testMod'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Mod(QQN::TypeTest()->TestInt, 10), 1));

            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 'testPower'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Power(QQN::TypeTest()->TestFloat, 2), 9.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 'testPower'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Power(QQN::TypeTest()->TestFloat, 2), 9.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('power2', QQ::Power(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::Clause(
                        QQ::OrderBy(QQ::Virtual('power2'), false)
                        , QQ::Expand(QQ::Virtual('power2'))
                    ));

            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::GreaterThan(
                        QQ::Virtual('power2', QQ::Power(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 'TypeTest' in method 'setUp'.
            Open

                    TypeTest::DeleteAll();

            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 'testCeil'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Ceil(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 'testSelect'.
            Open

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

            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 'testFloor'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Floor(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 'testFunc'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::GreaterThan(QQ::Func('ABS', 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 'testCeil'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::Equal(QQ::Ceil(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 'testSelect'.
            Open

                        QQ::Virtual('power2', QQ::Power(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 'testOrderByDesc'.
            Open

                    $objResArray = TypeTest::QueryArray(QQ::GreaterThan(
                        QQ::Virtual('power2', QQ::Power(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 'testOrderByDesc'.
            Open

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

            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 testAbs() {
                    $objTest = new TypeTest();
                    $objTest->TestFloat = -1.0;
                    $objTest->Save();
                    
            Severity: Major
            Found in includes/tests/qcubed-unit/QQFuncTest.php and 1 other location - About 5 hrs to fix
            includes/tests/qcubed-unit/QQMathOpTest.php on lines 154..175

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

                public function testCeil() {
                    $objTest = new TypeTest();
                    $objTest->TestFloat = 1.1;
                    $objTest->Save();
                    
            Severity: Major
            Found in includes/tests/qcubed-unit/QQFuncTest.php and 2 other locations - About 4 hrs to fix
            includes/tests/qcubed-unit/QQFuncTest.php on lines 86..107
            includes/tests/qcubed-unit/QQFuncTest.php on lines 165..186

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

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

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

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

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

            Refactorings

            Further Reading

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

                public function testSqrt() {
                    $objTest = new TypeTest();
                    $objTest->TestFloat = 4.0;
                    $objTest->Save();
                    
            Severity: Major
            Found in includes/tests/qcubed-unit/QQFuncTest.php and 2 other locations - About 4 hrs to fix
            includes/tests/qcubed-unit/QQFuncTest.php on lines 63..84
            includes/tests/qcubed-unit/QQFuncTest.php on lines 86..107

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

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

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

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

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

            Refactorings

            Further Reading

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

                public function testFloor() {
                    $objTest = new TypeTest();
                    $objTest->TestFloat = 1.1;
                    $objTest->Save();
                    
            Severity: Major
            Found in includes/tests/qcubed-unit/QQFuncTest.php and 2 other locations - About 4 hrs to fix
            includes/tests/qcubed-unit/QQFuncTest.php on lines 63..84
            includes/tests/qcubed-unit/QQFuncTest.php on lines 165..186

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

            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/QQFuncTest.php and 1 other location - About 2 hrs to fix
            includes/tests/qcubed-unit/QQFuncTest.php on lines 243..256

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

            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(3.0, $objRes->TestFloat);
            Severity: Major
            Found in includes/tests/qcubed-unit/QQFuncTest.php and 1 other location - About 2 hrs to fix
            includes/tests/qcubed-unit/QQFuncTest.php on lines 206..219

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

            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