Dhii/validation-abstract

View on GitHub
src/AbstractValidator.php

Summary

Maintainability
A
0 mins
Test Coverage

The method _validate is not named in camelCase.
Invalid

    protected function _validate($subject)
    {
        $errors = $this->_getValidationErrors($subject);
        if (!count($errors)) {
            return;
Severity: Minor
Found in src/AbstractValidator.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 _isValid is not named in camelCase.
Invalid

    protected function _isValid($subject)
    {
        try {
            $this->_validate($subject);
        } catch (ValidationFailedExceptionInterface $e) {
Severity: Minor
Found in src/AbstractValidator.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 _getValidationErrors is not named in camelCase.
Invalid

    abstract protected function _getValidationErrors($subject);
Severity: Minor
Found in src/AbstractValidator.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 _createValidationException is not named in camelCase.
Invalid

    abstract protected function _createValidationException($message, $code = 0, \Exception $previous = null);
Severity: Minor
Found in src/AbstractValidator.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 _createValidationFailedException is not named in camelCase.
Invalid

    abstract protected function _createValidationFailedException($message, $code = 0, \Exception $previous = null, $validationErrors = array());
Severity: Minor
Found in src/AbstractValidator.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