Dhii/validation-abstract

View on GitHub
src/Exception/AbstractValidationFailedException.php

Summary

Maintainability
A
0 mins
Test Coverage

The method _getValidationErrors is not named in camelCase.
Invalid

    protected function _getValidationErrors()
    {
        if (!$this->_isValidList($this->validationErrors)) {
            $this->validationErrors = array();
        }

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 _assertList is not named in camelCase.
Invalid

    protected function _assertList($list)
    {
        if (!$this->_isValidList($list)) {
            throw $this->_createValidationException('The list is invalid');
        }

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 _getValidationSubject is not named in camelCase.
Invalid

    protected function _getValidationSubject()
    {
        return $this->validationSubject;
    }

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 _setValidationSubject is not named in camelCase.
Invalid

    protected function _setValidationSubject($subject)
    {
        $this->validationSubject = $subject;

        return $this;

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 _isValidList is not named in camelCase.
Invalid

    protected function _isValidList($list)
    {
        if (!is_array($list) && !($list instanceof Traversable)) {
            return false;
        }

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 _setValidationErrors is not named in camelCase.
Invalid

    protected function _setValidationErrors($errorList)
    {
        $this->_assertList($errorList);
        $this->validationErrors = $errorList;

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 _createValidationException is not named in camelCase.
Invalid

    abstract protected function _createValidationException($message, $code = 0, \Exception $previous = null);

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