Avoid using static access to class 'FML\Script\Builder' in method '__toString'. Open
return Builder::getLabelImplementationBlock($this->name, $this->text, $this->isolated);
- Read upRead up
- Exclude checks
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";
- Exclude checks
Class constants must be uppercase; expected TICK but found Tick Open
const Tick = "FML_Tick";
- Exclude checks
Class constants must be uppercase; expected MOUSEOUT but found MouseOut Open
const MouseOut = "FML_MouseOut";
- Exclude checks
Class constants must be uppercase; expected LOOP but found Loop Open
const Loop = "FML_Loop";
- Exclude checks
Class constants must be uppercase; expected KEYPRESS but found KeyPress Open
const KeyPress = "FML_KeyPress";
- Exclude checks
Class constants must be uppercase; expected MOUSECLICK2 but found MouseClick2 Open
const MouseClick2 = "FML_MouseClick2";
- Exclude checks
The closing brace for the class must go on the next line after the body Open
}
- Exclude checks
Class constants must be uppercase; expected ENTRYSUBMIT but found EntrySubmit Open
const EntrySubmit = "FML_EntrySubmit";
- Exclude checks
Class constants must be uppercase; expected MOUSECLICK but found MouseClick Open
const MouseClick = "FML_MouseClick";
- Exclude checks
Class constants must be uppercase; expected MOUSEOVER but found MouseOver Open
const MouseOver = "FML_MouseOver";
- Exclude checks
The 'getIsolated()' method which returns a boolean should be named 'is...()' or 'has...()' Open
public function getIsolated()
{
return $this->isolated;
}
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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";
- Read upRead up
- Exclude checks
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
}