Dhii/simple-test

View on GitHub
src/Test/ResultSetCollection.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '35', column '20').
Open

        return new \AppendIterator();
Severity: Minor
Found in src/Test/ResultSetCollection.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 method _createSearchResultsIterator is not named in camelCase.
Open

    protected function _createSearchResultsIterator($results)
    {
        $class    = 'Dhii\SimpleTest\Test\ResultSet';
        $instance = new $class(array(), $this->_getStatAggregator());
        /* @var $instance AbstractSearchableCollection */
Severity: Minor
Found in src/Test/ResultSetCollection.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 _createInnerIterator is not named in camelCase.
Open

    protected function _createInnerIterator()
    {
        return new \AppendIterator();
    }
Severity: Minor
Found in src/Test/ResultSetCollection.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 _validateItem is not named in camelCase.
Open

    protected function _validateItem($item)
    {
        if (!($item instanceof ResultSetInterface)) {
            throw new UnexpectedValueException(sprintf('Item must be a valid test result set'));
        }
Severity: Minor
Found in src/Test/ResultSetCollection.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 _isValidSearchResult is not named in camelCase.
Open

    protected function _isValidSearchResult($item)
    {
        return $item instanceof ResultInterface;
    }
Severity: Minor
Found in src/Test/ResultSetCollection.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