Asymptix/Framework

View on GitHub
framework/core/Content.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused local variables such as '$_TPL'.
Open

        $_TPL = $tplVariables;
Severity: Minor
Found in framework/core/Content.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

The variable $_TPL is not named in camelCase.
Open

    public static function render($tplPath, $tplVariables = []) {
        $_TPL = $tplVariables;

        ob_start();
        include($tplPath);
Severity: Minor
Found in framework/core/Content.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status