steeffeen/FancyManiaLinks

View on GitHub
FML/Script/ScriptLabel.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::getLabelImplementationBlock($this->name, $this->text, $this->isolated);
Severity: Minor
Found in FML/Script/ScriptLabel.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

Class constants must be uppercase; expected ONINIT but found OnInit
Open

    const OnInit      = "FML_OnInit";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

Class constants must be uppercase; expected TICK but found Tick
Open

    const Tick        = "FML_Tick";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

Class constants must be uppercase; expected MOUSEOUT but found MouseOut
Open

    const MouseOut    = "FML_MouseOut";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

Class constants must be uppercase; expected LOOP but found Loop
Open

    const Loop        = "FML_Loop";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

Class constants must be uppercase; expected KEYPRESS but found KeyPress
Open

    const KeyPress    = "FML_KeyPress";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

Class constants must be uppercase; expected MOUSECLICK2 but found MouseClick2
Open

    const MouseClick2 = "FML_MouseClick2";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

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

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

Class constants must be uppercase; expected ENTRYSUBMIT but found EntrySubmit
Open

    const EntrySubmit = "FML_EntrySubmit";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

Class constants must be uppercase; expected MOUSECLICK but found MouseClick
Open

    const MouseClick  = "FML_MouseClick";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

Class constants must be uppercase; expected MOUSEOVER but found MouseOver
Open

    const MouseOver   = "FML_MouseOver";
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpcodesniffer

The 'getIsolated()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function getIsolated()
    {
        return $this->isolated;
    }
Severity: Minor
Found in FML/Script/ScriptLabel.php by phpmd

BooleanGetMethodName

Since: 0.2

Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

Example

class Foo {
    /**
     * @return boolean
     */
    public function getFoo() {} // bad
    /**
     * @return bool
     */
    public function isFoo(); // ok
    /**
     * @return boolean
     */
    public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}

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

Constant EntrySubmit should be defined in uppercase
Open

    const EntrySubmit = "FML_EntrySubmit";
Severity: Minor
Found in FML/Script/ScriptLabel.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 Loop should be defined in uppercase
Open

    const Loop        = "FML_Loop";
Severity: Minor
Found in FML/Script/ScriptLabel.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 KeyPress should be defined in uppercase
Open

    const KeyPress    = "FML_KeyPress";
Severity: Minor
Found in FML/Script/ScriptLabel.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 MouseClick should be defined in uppercase
Open

    const MouseClick  = "FML_MouseClick";
Severity: Minor
Found in FML/Script/ScriptLabel.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 MouseOver should be defined in uppercase
Open

    const MouseOver   = "FML_MouseOver";
Severity: Minor
Found in FML/Script/ScriptLabel.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 MouseOut should be defined in uppercase
Open

    const MouseOut    = "FML_MouseOut";
Severity: Minor
Found in FML/Script/ScriptLabel.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 OnInit should be defined in uppercase
Open

    const OnInit      = "FML_OnInit";
Severity: Minor
Found in FML/Script/ScriptLabel.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 Tick should be defined in uppercase
Open

    const Tick        = "FML_Tick";
Severity: Minor
Found in FML/Script/ScriptLabel.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 MouseClick2 should be defined in uppercase
Open

    const MouseClick2 = "FML_MouseClick2";
Severity: Minor
Found in FML/Script/ScriptLabel.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