Dhii/iterator-abstract

View on GitHub

Showing 113 of 113 total issues

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

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

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

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

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

Avoid too many return statements within this method.
Open

        return $this->_loop();
Severity: Major
Found in src/RecursiveIteratorTrait.php - About 30 mins to fix

    The method _advanceTracker is not named in camelCase.
    Open

        protected function _advanceTracker($tracker)
        {
            if (!($tracker instanceof Iterator)) {
                throw $this->_createInvalidArgumentException($this->__('Can only advance an Iterator tracker'), null, null, $tracker);
            }
    Severity: Minor
    Found in src/IteratorIteratorTrait.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 _resetTracker is not named in camelCase.
    Open

        protected function _resetTracker($tracker)
        {
            if (!($tracker instanceof Iterator)) {
                throw $this->_createInvalidArgumentException($this->__('Can only reset an Iterator tracker'), null, null, $tracker);
            }
    Severity: Minor
    Found in src/IteratorIteratorTrait.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 _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 _loop is not named in camelCase.
    Open

        protected function _loop()
        {
            // Ensure that there are items on the stack
            if (!$this->_hasParents()) {
                return $this->_createIteration(null, null);
    Severity: Minor
    Found in src/RecursiveIteratorTrait.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->_hasParents();
        }
    Severity: Minor
    Found in src/RecursiveIteratorTrait.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 _getCurrentIterable is not named in camelCase.
    Open

        protected function &_getCurrentIterable()
        {
            $iterable = &$this->_getTopmostParent();
    
            return $iterable;
    Severity: Minor
    Found in src/RecursiveIteratorTrait.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 _resetTracker is not named in camelCase.
    Open

        abstract protected function _resetTracker($tracker);
    Severity: Minor
    Found in src/TrackingIteratorTrait.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 _createIterationFromTracker is not named in camelCase.
    Open

        abstract protected function _createIterationFromTracker($tracker);
    Severity: Minor
    Found in src/TrackingIteratorTrait.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 _backtrackLoop is not named in camelCase.
    Open

        protected function _backtrackLoop()
        {
            $this->_popParent();
    
            if (!$this->_hasParents()) {
    Severity: Minor
    Found in src/RecursiveIteratorTrait.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 _pushParent is not named in camelCase.
    Open

        protected function _pushParent(&$parent)
        {
            $children    = &$this->_getElementChildren($parent);
            $pathSegment = $this->_getElementPathSegment(null, $parent);
    
    
    Severity: Minor
    Found in src/RecursiveIteratorTrait.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 _getTopmostParent is not named in camelCase.
    Open

        protected function &_getTopmostParent()
        {
            if (isset($this->parents[0])) {
                return $this->parents[0];
            }
    Severity: Minor
    Found in src/RecursiveIteratorTrait.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 _getElementChildren is not named in camelCase.
    Open

        protected function &_getElementChildren($value)
        {
            $children = $this->_isElementHasChildren($value)
                /* @var $value ChildrenAwareInterface */
                ? $value->getChildren()

    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 _createInvalidArgumentException is not named in camelCase.
    Open

        abstract protected function _createInvalidArgumentException(
            $message = null,
            $code = null,
            RootException $previous = null,
            $argument = null
    Severity: Minor
    Found in src/IteratorAwareTrait.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 _calculateKey is not named in camelCase.
    Open

        protected function _calculateKey(Iterator $iterator)
        {
            return $iterator->valid()
                ? $iterator->key()
                : null;
    Severity: Minor
    Found in src/IteratorIteratorTrait.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 _getCurrentIterableKey is not named in camelCase.
    Open

        abstract protected function _getCurrentIterableKey(&$iterable);
    Severity: Minor
    Found in src/RecursiveIteratorTrait.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

    Severity
    Category
    Status
    Source
    Language