steeffeen/FancyManiaLinks

View on GitHub

Showing 2,233 of 2,233 total issues

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

    public function getAutoComplete()
    {
        return $this->autoComplete;
    }
Severity: Minor
Found in FML/Controls/Entry.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

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

    public function getAutoNewLine();
Severity: Minor
Found in FML/Types/NewLineable.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

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

    public function getLooping();
Severity: Minor
Found in FML/Types/Playable.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

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

    public function getStyleSelected()
    {
        return $this->styleSelected;
    }
Severity: Minor
Found in FML/Controls/Quad.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

The method appendGenericScriptLabel uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $scriptLabel = new ScriptLabel($name, $text, $isolated);
        }
Severity: Minor
Found in FML/Script/Script.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

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

    public function getMusic();
Severity: Minor
Found in FML/Types/Playable.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

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

    public function getChatAvatarVisible()
    {
        return $this->getVisibleProperty($this->chatAvatarProperties);
    }
Severity: Minor
Found in FML/XmlRpc/UIProperties.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

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

    public function getGoVisible()
    {
        return $this->getVisibleProperty($this->goProperties);
    }
Severity: Minor
Found in FML/XmlRpc/UIProperties.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

Avoid using static access to class '\FML\Script\Features\ScriptFeature' in method 'getScriptFeatures'.
Open

        return ScriptFeature::collect($this->feature, $this->getEntry());
Severity: Minor
Found in FML/Components/RadioButtonGroup.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 'getVisible()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function getVisible()
    {
        return $this->visible;
    }
Severity: Minor
Found in FML/Controls/Control.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

The method render() has an NPath complexity of 24576. The configured NPath complexity threshold is 200.
Open

    public function render(\DOMDocument $domDocument)
    {
        $domElement = parent::render($domDocument);
        if ($this->name) {
            $domElement->setAttribute("name", $this->name);
Severity: Minor
Found in FML/Controls/Entry.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

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

    public function getCentered()
    {
        return $this->centered;
    }
Severity: Minor
Found in FML/Controls/Gauge.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

The method render() has an NPath complexity of 12582912. The configured NPath complexity threshold is 200.
Open

    public function render(\DOMDocument $domDocument)
    {
        $domElement = parent::render($domDocument);
        if ($this->text) {
            $domElement->setAttribute("text", $this->text);
Severity: Minor
Found in FML/Controls/Label.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

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

The method render() has an NPath complexity of 2048. The configured NPath complexity threshold is 200.
Open

    public function render(\DOMDocument $domDocument)
    {
        $style3dXml = $domDocument->createElement("style3d");
        $this->checkId();
        if ($this->styleId) {
Severity: Minor
Found in FML/Stylesheet/Style3d.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

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

        return Builder::getConstant($this->name, $this->value);
Severity: Minor
Found in FML/Script/ScriptConstant.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 'getChatVisible()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function getChatVisible()
    {
        return $this->getVisibleProperty($this->chatProperties);
    }
Severity: Minor
Found in FML/XmlRpc/UIProperties.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

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

    protected function getVisibleProperty(array &$properties)
    {
        return $this->getProperty($properties, "visible");
    }
Severity: Minor
Found in FML/XmlRpc/UIProperties.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

The method setEnabledDesign uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $checkBoxDesign = new CheckBoxDesign($style, $subStyle);
            $this->feature->setEnabledDesign($checkBoxDesign);
        }
Severity: Minor
Found in FML/Components/CheckBox.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method setDisabledDesign uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $checkBoxDesign = new CheckBoxDesign($style, $subStyle);
            $this->feature->setDisabledDesign($checkBoxDesign);
        }
Severity: Minor
Found in FML/Components/CheckBox.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Severity
Category
Status
Source
Language