steeffeen/FancyManiaLinks

View on GitHub
FML/ManiaLinks.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Missing class import via use statement (line '179', column '43').
Open

        $domDocument                = new \DOMDocument("1.0", "utf-8");
Severity: Minor
Found in FML/ManiaLinks.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

The method getCustomUI has a boolean flag argument $createIfEmpty, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getCustomUI($createIfEmpty = true)
Severity: Minor
Found in FML/ManiaLinks.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method render has a boolean flag argument $echo, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function render($echo = false)
Severity: Minor
Found in FML/ManiaLinks.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

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

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

There are no issues that match your filters.

Category
Status