kai-jacobsen/kontentblocks

View on GitHub
core/Fields/Definitions/OpeningTimes.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$customizeManager'.
Open

    public function addCustomizerControl(WP_Customize_Manager $customizeManager, CustomizerIntegration $integration)

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

Avoid unused parameters such as '$integration'.
Open

    public function addCustomizerControl(WP_Customize_Manager $customizeManager, CustomizerIntegration $integration)

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

Avoid unused parameters such as '$old'.
Open

    public function save($new, $old)

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

TODO found
Open

 * TODO: document configuration

TODO found
Open

        return parent::_save($new, $old); // TODO: Change the autogenerated stub

Avoid variables with short names like $v. Configured minimum length is 3.
Open

            array_walk_recursive($splitValues, function ($v) use (&$hasSplit) {

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The method _save is not named in camelCase.
Open

    public function _save($new, $old = null)
    {
        foreach ($new as &$item) {
            if (!isset($item['closed'])) {
                $item['closed'] = 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