Dhii/simple-test-abstract

View on GitHub
src/Suite/AbstractSuite.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '76', column '23').
Open

            throw new \InvalidArgumentException(sprintf('Could not add test "%3$s" to suite "%1$s": test already belongs to suite "%2$s"', $this->getCode(), $test->getSuiteCode(), $test->getKey()));
Severity: Minor
Found in src/Suite/AbstractSuite.php by phpmd

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

The variable $_test is not named in camelCase.
Open

    protected function _addTests($tests)
    {
        foreach ($tests as $_test) {
            $this->addTest($_test);
        }
Severity: Minor
Found in src/Suite/AbstractSuite.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_test is not named in camelCase.
Open

    protected function _addTests($tests)
    {
        foreach ($tests as $_test) {
            $this->addTest($_test);
        }
Severity: Minor
Found in src/Suite/AbstractSuite.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The method _getTests is not named in camelCase.
Open

    protected function _getTests()
    {
        return $this->items;
    }
Severity: Minor
Found in src/Suite/AbstractSuite.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/Suite/AbstractSuite.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 _addTest is not named in camelCase.
Open

    protected function _addTest(Test\TestInterface $test)
    {
        $test->setSuiteCode($this->getCode());
        $this->_addItem($test);

Severity: Minor
Found in src/Suite/AbstractSuite.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 _addTests is not named in camelCase.
Open

    protected function _addTests($tests)
    {
        foreach ($tests as $_test) {
            $this->addTest($_test);
        }
Severity: Minor
Found in src/Suite/AbstractSuite.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 _setCode is not named in camelCase.
Open

    protected function _setCode($code)
    {
        $this->code = $code;

        return $this;
Severity: Minor
Found in src/Suite/AbstractSuite.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 _getCode is not named in camelCase.
Open

    protected function _getCode()
    {
        return $this->code;
    }
Severity: Minor
Found in src/Suite/AbstractSuite.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/Suite/AbstractSuite.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