Dhii/iterator-abstract

View on GitHub
src/IteratorTrait.php

Summary

Maintainability
A
0 mins
Test Coverage

Return type of _getIteration() is undeclared type \Dhii\Iterator\IterationInterface
Open

    abstract protected function _getIteration();
Severity: Minor
Found in src/IteratorTrait.php by phan

Return type of _throwIteratorException() is undeclared type \Dhii\Iterator\Exception\IteratorExceptionInterface
Open

    abstract protected function _throwIteratorException(
Severity: Minor
Found in src/IteratorTrait.php by phan

@throws type of _next has undeclared type \Dhii\Iterator\Exception\IteratorExceptionInterface
Open

    protected function _next()
Severity: Minor
Found in src/IteratorTrait.php by phan

Parameter $iteration has undeclared type \Dhii\Iterator\IterationInterface
Open

    abstract protected function _setIteration(IterationInterface $iteration = null);
Severity: Minor
Found in src/IteratorTrait.php by phan

Parameter $message has undeclared type \Dhii\Util\String\StringableInterface
Open

    abstract protected function _throwIteratorException(
Severity: Minor
Found in src/IteratorTrait.php by phan

Call to method getValue from undeclared class \Dhii\Iterator\IterationInterface
Open

        return $this->_getIteration()->getValue();
Severity: Critical
Found in src/IteratorTrait.php by phan

Call to method getKey from undeclared class \Dhii\Iterator\IterationInterface
Open

        return $this->_getIteration()->getKey();
Severity: Critical
Found in src/IteratorTrait.php by phan

Return type of _loop() is undeclared type \Dhii\Iterator\IterationInterface
Open

    abstract protected function _loop();
Severity: Minor
Found in src/IteratorTrait.php by phan

Return type of _reset() is undeclared type \Dhii\Iterator\IterationInterface
Open

    abstract protected function _reset();
Severity: Minor
Found in src/IteratorTrait.php by phan

Avoid using short method names like IteratorTrait::__(). The configured minimum method name length is 3.
Open

    abstract protected function __($string, $args = [], $context = null);
Severity: Minor
Found in src/IteratorTrait.php by phpmd

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

The method _key is not named in camelCase.
Open

    protected function _key()
    {
        return $this->_getIteration()->getKey();
    }
Severity: Minor
Found in src/IteratorTrait.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 _value is not named in camelCase.
Open

    protected function _value()
    {
        return $this->_getIteration()->getValue();
    }
Severity: Minor
Found in src/IteratorTrait.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 _getIteration is not named in camelCase.
Open

    abstract protected function _getIteration();
Severity: Minor
Found in src/IteratorTrait.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 _reset is not named in camelCase.
Open

    abstract protected function _reset();
Severity: Minor
Found in src/IteratorTrait.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 __ is not named in camelCase.
Open

    abstract protected function __($string, $args = [], $context = null);
Severity: Minor
Found in src/IteratorTrait.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 _rewind is not named in camelCase.
Open

    protected function _rewind()
    {
        try {
            $this->_setIteration($this->_reset());
        } catch (RootException $exception) {
Severity: Minor
Found in src/IteratorTrait.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 _setIteration is not named in camelCase.
Open

    abstract protected function _setIteration(IterationInterface $iteration = null);
Severity: Minor
Found in src/IteratorTrait.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 _throwIteratorException is not named in camelCase.
Open

    abstract protected function _throwIteratorException(
        $message = null,
        $code = null,
        RootException $previous = null
    );
Severity: Minor
Found in src/IteratorTrait.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 _next is not named in camelCase.
Open

    protected function _next()
    {
        try {
            $this->_setIteration($this->_loop());
        } catch (RootException $exception) {
Severity: Minor
Found in src/IteratorTrait.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 _valid is not named in camelCase.
Open

    protected function _valid()
    {
        return $this->_key() !== null;
    }
Severity: Minor
Found in src/IteratorTrait.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 _loop is not named in camelCase.
Open

    abstract protected function _loop();
Severity: Minor
Found in src/IteratorTrait.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