gomoob/php-websocket-server

View on GitHub
src/test/php/Gomoob/WebSocket/Util/TagsTreeTest.php

Summary

Maintainability
B
4 hrs
Test Coverage

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

    public function testFindByTags()
    {
        $object0 = new \DateTime();
        $object1 = new \DateTime();
        $object2 = new \DateTime();
Severity: Minor
Found in src/test/php/Gomoob/WebSocket/Util/TagsTreeTest.php - About 1 hr to fix

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

        public function testDelete()
        {
            $object0 = new \DateTime();
            $object1 = new \DateTime();
            $object2 = new \DateTime();
    Severity: Minor
    Found in src/test/php/Gomoob/WebSocket/Util/TagsTreeTest.php - About 1 hr to fix

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

          public function testAdd()
          {
              $tagsTree = new TagsTree();
              
              // Test with an invalid tag key (i.e not a string)
      Severity: Minor
      Found in src/test/php/Gomoob/WebSocket/Util/TagsTreeTest.php - About 1 hr to fix

        Missing class import via use statement (line '43', column '59').
        Open

                    $tagsTree->add(new \DateTime(), ['tag' => new \DateTime()]);

        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 '80', column '24').
        Open

                $object0 = new \DateTime();

        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 '117', column '24').
        Open

                $object0 = new \DateTime();

        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 '172', column '24').
        Open

                $object1 = new \DateTime();

        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 '56', column '24').
        Open

                $object0 = new \DateTime();

        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 '174', column '24').
        Open

                $object3 = new \DateTime();

        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 '171', column '24').
        Open

                $object0 = new \DateTime();

        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 '32', column '32').
        Open

                    $tagsTree->add(new \DateTime(), [45 => 'aValue']);

        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 '173', column '24').
        Open

                $object2 = new \DateTime();

        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 '119', column '24').
        Open

                $object2 = new \DateTime();

        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 '176', column '24').
        Open

                $object5 = new \DateTime();

        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 '24').
        Open

                $object1 = new \DateTime();

        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 '81', column '24').
        Open

                $object1 = new \DateTime();

        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 '82', column '24').
        Open

                $object2 = new \DateTime();

        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 '118', column '24').
        Open

                $object1 = new \DateTime();

        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 '175', column '24').
        Open

                $object4 = new \DateTime();

        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 '43', column '32').
        Open

                    $tagsTree->add(new \DateTime(), ['tag' => new \DateTime()]);

        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

        There are no issues that match your filters.

        Category
        Status