yiisoft/yii2

View on GitHub
framework/caching/ExpressionDependency.php

Summary

Maintainability
A
0 mins
Test Coverage

The method generateDependencyData() contains an eval expression.
Open

        return eval("return {$this->expression};");

EvalExpression

Since: 0.2

An eval-expression is untestable, a security risk and bad practice. Therefore it should be avoided. Consider to replace the eval-expression with regular code.

Example

class Foo {
    public function bar($param)  {
        if ($param === 42) {
            eval('$param = 23;');
        }
    }
}

Source https://phpmd.org/rules/design.html#evalexpression

Avoid unused parameters such as '$cache'.
Open

    protected function generateDependencyData($cache)

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

There are no issues that match your filters.

Category
Status