AbstractStatefulTester
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractStatefulTester extends AbstractTester
{
/** @var Writer\WriterInterface */
protected $writer;
/** @var Stats\AggregatorInterface */
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 */
- Read upRead up
- Exclude checks
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 _getWriterInstance is not named in camelCase. Open
protected function _getWriterInstance()
{
if (is_null($this->_getWriter())) {
$this->_setWriter($this->_createWriter());
}
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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());
}
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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(),
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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()));
}
- Read upRead up
- Exclude checks
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;
- Read upRead up
- Exclude checks
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 _getStatAggregatorInstance is not named in camelCase. Open
protected function _getStatAggregatorInstance()
{
if (is_null($this->_getStatAggregator())) {
$this->_setStatAggregator($this->_createStatAggregator());
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}