HuasoFoundries/jpgraph

View on GitHub
src/util/FlagCache.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$aFullName' which will lead to PHP notices.
Open

        $idx = $f->GetIdxByName($aName, $aFullName);
Severity: Minor
Found in src/util/FlagCache.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

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

        $idx = $f->GetIdxByName($aName, $aFullName);
Severity: Minor
Found in src/util/FlagCache.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

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

        $f   = self::$_gFlagCache[$aSize];
Severity: Minor
Found in src/util/FlagCache.php by phpmd

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

Property name "$_gFlagCache" should not be prefixed with an underscore to indicate visibility
Open

    private static $_gFlagCache = [
Severity: Minor
Found in src/util/FlagCache.php by phpcodesniffer

Method name "FlagCache::GetFlagImgByName" is not in camel caps format
Open

    public static function GetFlagImgByName($aSize, $aName)
Severity: Minor
Found in src/util/FlagCache.php by phpcodesniffer

There are no issues that match your filters.

Category
Status