steeffeen/FancyManiaLinks

View on GitHub
FML/Controls/Frame3d.php

Summary

Maintainability
A
45 mins
Test Coverage
A
100%

Function render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function render(\DOMDocument $domDocument)
    {
        $domElement = parent::render($domDocument);
        if ($this->style3d) {
            $this->style3d->checkId();
Severity: Minor
Found in FML/Controls/Frame3d.php - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Avoid excessively long variable names like $scriptActionParameters. Keep variable name length under 20.
Open

    public function setScriptActionParameters(array $scriptActionParameters = null)
Severity: Minor
Found in FML/Controls/Frame3d.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

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

Avoid excessively long variable names like $scriptActionParameters. Keep variable name length under 20.
Open

    protected $scriptActionParameters = null;
Severity: Minor
Found in FML/Controls/Frame3d.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

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

Avoid excessively long variable names like $scriptActionParameters. Keep variable name length under 20.
Open

    public function setScriptAction($scriptAction, array $scriptActionParameters = null)
Severity: Minor
Found in FML/Controls/Frame3d.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

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

Class constants must be uppercase; expected STYLE_STATION3X3 but found STYLE_Station3x3
Open

    const STYLE_Station3x3  = "Station3x3";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_TITLELOGO but found STYLE_TitleLogo
Open

    const STYLE_TitleLogo   = "TitleLogo";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_BASEBOXCASE but found STYLE_BaseBoxCase
Open

    const STYLE_BaseBoxCase = "BaseBoxCase";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_BUTTONBACK but found STYLE_ButtonBack
Open

    const STYLE_ButtonBack  = "ButtonBack";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_TITLELOGO but found STYLE_Titlelogo
Open

    const STYLE_Titlelogo   = "Titlelogo";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_WINDOW but found STYLE_Window
Open

    const STYLE_Window      = "Window";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_BASESTATION but found STYLE_BaseStation
Open

    const STYLE_BaseStation = "BaseStation";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_BUTTONH but found STYLE_ButtonH
Open

    const STYLE_ButtonH     = "ButtonH";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_BUTTONNAV but found STYLE_ButtonNav
Open

    const STYLE_ButtonNav   = "ButtonNav";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Class constants must be uppercase; expected STYLE_TITLE but found STYLE_Title
Open

    const STYLE_Title       = "Title";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

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

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

Class constants must be uppercase; expected STYLE_TITLEEDITOR but found STYLE_TitleEditor
Open

    const STYLE_TitleEditor = "TitleEditor";
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

Constant STYLE_TitleEditor should be defined in uppercase
Open

    const STYLE_TitleEditor = "TitleEditor";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_ButtonBack should be defined in uppercase
Open

    const STYLE_ButtonBack  = "ButtonBack";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_Window should be defined in uppercase
Open

    const STYLE_Window      = "Window";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_TitleLogo should be defined in uppercase
Open

    const STYLE_TitleLogo   = "TitleLogo";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_ButtonH should be defined in uppercase
Open

    const STYLE_ButtonH     = "ButtonH";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_Titlelogo should be defined in uppercase
Open

    const STYLE_Titlelogo   = "Titlelogo";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_ButtonNav should be defined in uppercase
Open

    const STYLE_ButtonNav   = "ButtonNav";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_Title should be defined in uppercase
Open

    const STYLE_Title       = "Title";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_Station3x3 should be defined in uppercase
Open

    const STYLE_Station3x3  = "Station3x3";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_BaseStation should be defined in uppercase
Open

    const STYLE_BaseStation = "BaseStation";
Severity: Minor
Found in FML/Controls/Frame3d.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 STYLE_BaseBoxCase should be defined in uppercase
Open

    const STYLE_BaseBoxCase = "BaseBoxCase";
Severity: Minor
Found in FML/Controls/Frame3d.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

Usage of ELSE IF is discouraged; use ELSEIF instead
Open

        } else if ($this->style3dId) {
Severity: Minor
Found in FML/Controls/Frame3d.php by phpcodesniffer

There are no issues that match your filters.

Category
Status