Dhii/collections-abstract-base

View on GitHub

Showing 62 of 62 total issues

The variable $_key is not named in camelCase.
Open

    protected function _addItems($items)
    {
        foreach ($items as $_key => $_item) {
            $this->_validateItem($_item);
            $this->_addItem($_item);
Severity: Minor
Found in src/AbstractCollection.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 $_idx is not named in camelCase.
Open

    protected function _arraySearch(&$array, $value, $strict = false)
    {
        // Regular array matching
        if (is_array($array)) {
            return array_search($value, $array, $strict);
Severity: Minor
Found in src/AbstractCollection.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 $_item is not named in camelCase.
Open

    protected function _addItems($items)
    {
        foreach ($items as $_key => $_item) {
            $this->_validateItem($_item);
            $this->_addItem($_item);
Severity: Minor
Found in src/AbstractCollection.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 _current is not named in camelCase.
Open

    protected function _current()
    {
        return $this->_arrayCurrent($this->_getCachedItems());
    }
Severity: Minor
Found in src/AbstractIterableCollection.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 _addItems is not named in camelCase.
Open

    protected function _addItems($items)
    {
        foreach ($items as $_key => $_item) {
            $this->_validateItem($_item);
            $this->_addItem($_item);
Severity: Minor
Found in src/AbstractCollection.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 _hash is not named in camelCase.
Open

    protected function _hash($value)
    {
        return is_scalar($value)
                ? $this->_hashScalar($value)
                : $this->_hashNonScalar($value);
Severity: Minor
Found in src/AbstractHasher.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 _arrayNext is not named in camelCase.
Open

    protected function _arrayNext(&$array)
    {
        return $array instanceof \Traversable
            ? $this->_getIterator($array)->next()
            : next($array);
Severity: Minor
Found in src/AbstractIterableCollection.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 _setItem is not named in camelCase.
Open

    protected function _setItem($key, $item)
    {
        return $this->_arraySet($this->items, $item, $key);
    }
Severity: Minor
Found in src/AbstractCollection.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 _hasItemKey is not named in camelCase.
Open

    protected function _hasItemKey($key)
    {
        return $this->_arrayKeyExists($this->items, $key);
    }
Severity: Minor
Found in src/AbstractCollection.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 _arrayCount is not named in camelCase.
Open

    public function _arrayCount(&$list)
    {
        if (is_array($list)) {
            return count($list);
        }
Severity: Minor
Found in src/AbstractIterableCollection.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 _arrayGet is not named in camelCase.
Open

    protected function _arrayGet(&$list, $key, $default = null)
    {
        if (is_array($list)) {
            return isset($list[$key])
                ? $list[$key]
Severity: Minor
Found in src/AbstractCollection.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 _arrayConvert is not named in camelCase.
Open

    protected function _arrayConvert(&$list)
    {
        if (is_array($list)) {
            return $list;
        }
Severity: Minor
Found in src/AbstractCollection.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()
    {
        $this->_arrayNext($this->_getCachedItems());
    }
Severity: Minor
Found in src/AbstractIterableCollection.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 _arrayCurrent is not named in camelCase.
Open

    protected function _arrayCurrent(&$array)
    {
        return $array instanceof \Traversable
            ? $this->_getIterator($array)->current()
            : current($array);
Severity: Minor
Found in src/AbstractIterableCollection.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 _count is not named in camelCase.
Open

    protected function _count()
    {
        return $this->_arrayCount($this->_getCachedItems());
    }
Severity: Minor
Found in src/AbstractIterableCollection.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 _arrayRewind is not named in camelCase.
Open

    protected function _arrayRewind(&$array)
    {
        return $array instanceof \Traversable
            ? $this->_getIterator($array)->rewind()
            : reset($array);
Severity: Minor
Found in src/AbstractIterableCollection.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 _addItem is not named in camelCase.
Open

    protected function _addItem($item)
    {
        $key = $this->_getItemUniqueKey($item);

        return $this->_arraySet($this->items, $item, $key);
Severity: Minor
Found in src/AbstractCollection.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 _hasItem is not named in camelCase.
Open

    protected function _hasItem($item)
    {
        return $this->_findItem($item, true) !== false;
    }
Severity: Minor
Found in src/AbstractCollection.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 _getItemKey is not named in camelCase.
Open

    protected function _getItemKey($item)
    {
        return $this->_hash($item);
    }
Severity: Minor
Found in src/AbstractCollection.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 _isValidItem is not named in camelCase.
Open

    protected function _isValidItem($item)
    {
        try {
            $this->_validateItem($item);
        } catch (Exception $ex) {
Severity: Minor
Found in src/AbstractCollection.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