Dhii/simple-test-abstract

View on GitHub
src/Tester/AbstractStatefulTester.php

Summary

Maintainability
A
2 hrs
Test Coverage

AbstractStatefulTester has 22 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class AbstractStatefulTester extends AbstractTester
{
    /** @var Writer\WriterInterface */
    protected $writer;
    /** @var Stats\AggregatorInterface */
Severity: Minor
Found in src/Tester/AbstractStatefulTester.php - About 2 hrs to fix

    The class AbstractStatefulTester has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13.
    Open

    abstract class AbstractStatefulTester extends AbstractTester
    {
        /** @var Writer\WriterInterface */
        protected $writer;
        /** @var Stats\AggregatorInterface */
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CouplingBetweenObjects

    Since: 1.1.0

    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

    Example

    class Foo {
        /**
         * @var \foo\bar\X
         */
        private $x = null;
    
        /**
         * @var \foo\bar\Y
         */
        private $y = null;
    
        /**
         * @var \foo\bar\Z
         */
        private $z = null;
    
        public function setFoo(\Foo $foo) {}
        public function setBar(\Bar $bar) {}
        public function setBaz(\Baz $baz) {}
    
        /**
         * @return \SplObjectStorage
         * @throws \OutOfRangeException
         * @throws \InvalidArgumentException
         * @throws \ErrorException
         */
        public function process(\Iterator $it) {}
    
        // ...
    }

    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

    The method _getStatAggregatorInstance is not named in camelCase.
    Open

        protected function _getStatAggregatorInstance()
        {
            if (is_null($this->_getStatAggregator())) {
                $this->_setStatAggregator($this->_createStatAggregator());
            }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getCoordinator is not named in camelCase.
    Open

        protected function _getCoordinator()
        {
            return $this->coordinator;
        }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getAssertionMakerInstance is not named in camelCase.
    Open

        protected function _getAssertionMakerInstance()
        {
            if (is_null($this->_getAssertionMaker())) {
                $this->_setAssertionMaker($this->_createAssertionMaker());
            }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getAssertionMaker is not named in camelCase.
    Open

        protected function _getAssertionMaker()
        {
            return $this->assertionMaker;
        }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getCoordinatorInstance is not named in camelCase.
    Open

        protected function _getCoordinatorInstance()
        {
            if (is_null($this->_getCoordinator())) {
                $this->_setCoordinator($this->_createCoordinator($this->_getWriterInstance()));
            }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _createWriter is not named in camelCase.
    Open

        abstract protected function _createWriter();
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _setStatAggregator is not named in camelCase.
    Open

        protected function _setStatAggregator(Stats\AggregatorInterface $statAggregator)
        {
            $this->statAggregator = $statAggregator;
    
            return $this;
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getWriterInstance is not named in camelCase.
    Open

        protected function _getWriterInstance()
        {
            if (is_null($this->_getWriter())) {
                $this->_setWriter($this->_createWriter());
            }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _createRunner is not named in camelCase.
    Open

        abstract protected function _createRunner(
                Coordinator\CoordinatorInterface $coordinator,
                Assertion\MakerInterface $assertionMaker,
                Stats\AggregatorInterface $statAggregator);
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getRunner is not named in camelCase.
    Open

        protected function _getRunner()
        {
            return $this->runner;
        }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getWriter is not named in camelCase.
    Open

        protected function _getWriter()
        {
            return $this->writer;
        }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _createAssertionMaker is not named in camelCase.
    Open

        abstract protected function _createAssertionMaker();
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _createCoordinator is not named in camelCase.
    Open

        abstract protected function _createCoordinator(Writer\WriterInterface $writer);
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getRunnerInstance is not named in camelCase.
    Open

        protected function _getRunnerInstance()
        {
            if (is_null($this->_getRunner())) {
                $this->_setRunner($this->_createRunner(
                        $this->_getCoordinatorInstance(),
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _setCoordinator is not named in camelCase.
    Open

        protected function _setCoordinator(Coordinator\CoordinatorInterface $coordinator)
        {
            $this->coordinator = $coordinator;
    
            return $this;
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getStatAggregator is not named in camelCase.
    Open

        protected function _getStatAggregator()
        {
            return $this->statAggregator;
        }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _createStatAggregator is not named in camelCase.
    Open

        abstract protected function _createStatAggregator();
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _setAssertionMaker is not named in camelCase.
    Open

        protected function _setAssertionMaker(Assertion\MakerInterface $assertionMaker)
        {
            $this->assertionMaker = $assertionMaker;
    
            return $this;
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _setRunner is not named in camelCase.
    Open

        protected function _setRunner(Runner\RunnerInterface $runner)
        {
            $this->runner = $runner;
    
            return $this;
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _getSuites is not named in camelCase.
    Open

        protected function _getSuites()
        {
            return $this->suites;
        }
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method _setWriter is not named in camelCase.
    Open

        protected function _setWriter(\Dhii\SimpleTest\Writer\WriterInterface $writer)
        {
            $this->writer = $writer;
    
            return $this;
    Severity: Minor
    Found in src/Tester/AbstractStatefulTester.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status