Dhii/wp-events

View on GitHub
src/EventCacheTrait.php

Summary

Maintainability
A
0 mins
Test Coverage

The method _removeCachedEvent is not named in camelCase.
Open

    protected function _removeCachedEvent($event)
    {
        $name = ($event instanceof EventInterface)
            ? $event->getName()
            : $event;
Severity: Minor
Found in src/EventCacheTrait.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 _createCachedEvent is not named in camelCase.
Open

    protected function _createCachedEvent($event, array $args = [])
    {
        $event = $this->_normalizeEvent($event, $args);
        $name  = $event->getName();

Severity: Minor
Found in src/EventCacheTrait.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 _hasCachedEvent is not named in camelCase.
Open

    protected function _hasCachedEvent($event)
    {
        $name = ($event instanceof EventInterface)
            ? $event->getName()
            : $event;
Severity: Minor
Found in src/EventCacheTrait.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 _normalizeEvent is not named in camelCase.
Open

    abstract protected function _normalizeEvent($event, $params = [], $target = null);
Severity: Minor
Found in src/EventCacheTrait.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 _getCachedEvent is not named in camelCase.
Open

    protected function _getCachedEvent($event, array $args = [])
    {
        $name = ($event instanceof EventInterface)
            ? $event->getName()
            : $event;
Severity: Minor
Found in src/EventCacheTrait.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