Dhii/exception

View on GitHub
src/CreateNativeInvalidArgumentExceptionCapableTrait.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$argument'.
Invalid

        $argument = null

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

The method _createInvalidArgumentException is not named in camelCase.
Invalid

    protected function _createInvalidArgumentException(
        $message = '',
        $code = 0,
        RootException $previous = null,
        $argument = 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