steeffeen/FancyManiaLinks

View on GitHub
FML/Controls/Quads/Quad_UIConstruction_Buttons2.php

Summary

Maintainability
A
1 hr
Test Coverage
F
0%

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<?php

namespace FML\Controls\Quads;

use FML\Controls\Quad;
Severity: Minor
Found in FML/Controls/Quads/Quad_UIConstruction_Buttons2.php and 1 other location - About 1 hr to fix
FML/Controls/Quads/Quad_Copilot.php on lines 1..39

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 100.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

The class Quad_UIConstruction_Buttons2 is not named in CamelCase.
Open

class Quad_UIConstruction_Buttons2 extends Quad
{

    /*
     * Constants

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

Class constants must be uppercase; expected SUBSTYLE_KEYSPASTE but found SUBSTYLE_KeysPaste
Open

    const SUBSTYLE_KeysPaste   = 'KeysPaste';

Class constants must be uppercase; expected SUBSTYLE_AIRMAPPING but found SUBSTYLE_AirMapping
Open

    const SUBSTYLE_AirMapping  = 'AirMapping';

Class constants must be uppercase; expected SUBSTYLE_KEYSDELETE but found SUBSTYLE_KeysDelete
Open

    const SUBSTYLE_KeysDelete  = 'KeysDelete';

Class constants must be uppercase; expected SUBSTYLE_SYMMETRY but found SUBSTYLE_Symmetry
Open

    const SUBSTYLE_Symmetry    = 'Symmetry';

Class constants must be uppercase; expected SUBSTYLE_KEYSCOPY but found SUBSTYLE_KeysCopy
Open

    const SUBSTYLE_KeysCopy    = 'KeysCopy';

Class constants must be uppercase; expected SUBSTYLE_OPEN but found SUBSTYLE_Open
Open

    const SUBSTYLE_Open        = 'Open';

Class constants must be uppercase; expected SUBSTYLE_NEW but found SUBSTYLE_New
Open

    const SUBSTYLE_New         = 'New';

Class constants must be uppercase; expected SUBSTYLE_COPY but found SUBSTYLE_Copy
Open

    const SUBSTYLE_Copy        = 'Copy';

Class constants must be uppercase; expected SUBSTYLE_KEYSADD but found SUBSTYLE_KeysAdd
Open

    const SUBSTYLE_KeysAdd     = 'KeysAdd';

Class constants must be uppercase; expected SUBSTYLE_BLOCKEDITOR but found SUBSTYLE_BlockEditor
Open

    const SUBSTYLE_BlockEditor = 'BlockEditor';

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

}

Class constants must be uppercase; expected SUBSTYLE_CUT but found SUBSTYLE_Cut
Open

    const SUBSTYLE_Cut         = 'Cut';

Class constants must be uppercase; expected SUBSTYLE_GHOSTBLOCKS but found SUBSTYLE_GhostBlocks
Open

    const SUBSTYLE_GhostBlocks = 'GhostBlocks';

Constant SUBSTYLE_AirMapping should be defined in uppercase
Open

    const SUBSTYLE_AirMapping  = 'AirMapping';

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 SUBSTYLE_Symmetry should be defined in uppercase
Open

    const SUBSTYLE_Symmetry    = 'Symmetry';

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 SUBSTYLE_Cut should be defined in uppercase
Open

    const SUBSTYLE_Cut         = 'Cut';

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 SUBSTYLE_GhostBlocks should be defined in uppercase
Open

    const SUBSTYLE_GhostBlocks = 'GhostBlocks';

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 SUBSTYLE_New should be defined in uppercase
Open

    const SUBSTYLE_New         = 'New';

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 SUBSTYLE_Open should be defined in uppercase
Open

    const SUBSTYLE_Open        = 'Open';

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 SUBSTYLE_KeysPaste should be defined in uppercase
Open

    const SUBSTYLE_KeysPaste   = 'KeysPaste';

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 SUBSTYLE_BlockEditor should be defined in uppercase
Open

    const SUBSTYLE_BlockEditor = 'BlockEditor';

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 SUBSTYLE_KeysAdd should be defined in uppercase
Open

    const SUBSTYLE_KeysAdd     = 'KeysAdd';

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 SUBSTYLE_Copy should be defined in uppercase
Open

    const SUBSTYLE_Copy        = 'Copy';

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 SUBSTYLE_KeysCopy should be defined in uppercase
Open

    const SUBSTYLE_KeysCopy    = 'KeysCopy';

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 SUBSTYLE_KeysDelete should be defined in uppercase
Open

    const SUBSTYLE_KeysDelete  = 'KeysDelete';

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

Class name "Quad_UIConstruction_Buttons2" is not in camel caps format
Open

class Quad_UIConstruction_Buttons2 extends Quad

There are no issues that match your filters.

Category
Status