steeffeen/FancyManiaLinks

View on GitHub
FML/Script/ScriptInclude.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid using static access to class 'FML\Script\Builder' in method '__toString'.
Open

        return Builder::getInclude($this->file, $this->namespace);
Severity: Minor
Found in FML/Script/ScriptInclude.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

The closing brace for the class must go on the next line after the body
Open

}
Severity: Minor
Found in FML/Script/ScriptInclude.php by phpcodesniffer

Class constants must be uppercase; expected MATHLIB but found MathLib
Open

    const MathLib = "MathLib";
Severity: Minor
Found in FML/Script/ScriptInclude.php by phpcodesniffer

Class constants must be uppercase; expected TEXTLIB but found TextLib
Open

    const TextLib = "TextLib";
Severity: Minor
Found in FML/Script/ScriptInclude.php by phpcodesniffer

Constant MathLib should be defined in uppercase
Open

    const MathLib = "MathLib";
Severity: Minor
Found in FML/Script/ScriptInclude.php by phpmd

ConstantNamingConventions

Since: 0.2

Class/Interface constant names should always be defined in uppercase.

Example

class Foo {
    const MY_NUM = 0; // ok
    const myTest = ""; // fail
}

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

Constant TextLib should be defined in uppercase
Open

    const TextLib = "TextLib";
Severity: Minor
Found in FML/Script/ScriptInclude.php by phpmd

ConstantNamingConventions

Since: 0.2

Class/Interface constant names should always be defined in uppercase.

Example

class Foo {
    const MY_NUM = 0; // ok
    const myTest = ""; // fail
}

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

There are no issues that match your filters.

Category
Status