jaroslavtyc/drd-plus-tables

View on GitHub
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php

Summary

Maintainability
F
5 days
Test Coverage

Function getModifierValuesFromModifiersTable has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function getModifierValuesFromModifiersTable(string $spellTraitValue): array
    {
        $matchingModifierValues = [];
        $modifiersTable = new ModifiersTable(Tables::getIt());
        foreach (ModifierCode::getPossibleValues() as $modifierValue) {
Severity: Minor
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php - About 35 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

Function getFormulaValuesFromFormulasTable has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function getFormulaValuesFromFormulasTable(string $spellTraitValue): array
    {
        $matchingFormulaValues = [];
        $formulasTable = new FormulasTable(Tables::getIt());
        foreach (FormulaCode::getPossibleValues() as $formulaValue) {
Severity: Minor
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php - About 35 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 using static access to class '\DrdPlus\Tables\Tables' in method 'I_can_get_modifiers'.
Open

        $spellTraitsTable = new SpellTraitsTable(Tables::getIt());

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

Avoid using static access to class '\DrdPlus\Tables\Tables' in method 'I_can_get_formulas'.
Open

        $spellTraitsTable = new SpellTraitsTable(Tables::getIt());

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

Avoid using static access to class '\DrdPlus\Tables\Tables' in method 'getFormulaValuesFromFormulasTable'.
Open

        $formulasTable = new FormulasTable(Tables::getIt());

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\ModifierCode' in method 'getModifierValuesFromModifiersTable'.
Open

        foreach (ModifierCode::getPossibleValues() as $modifierValue) {

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'I_can_get_formulas'.
Open

        foreach (SpellTraitCode::getPossibleValues() as $spellTraitValue) {

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\FormulaCode' in method 'getFormulaValuesFromFormulasTable'.
Open

            $spellTraits = $formulasTable->getSpellTraits(FormulaCode::getIt($formulaValue));

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'I_can_get_sum_of_difficulty_changes'.
Open

                        SpellTraitCode::getIt(SpellTraitCode::AFFECTING), // +6

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

Avoid using static access to class '\DrdPlus\Tables\Tables' in method 'I_can_get_sum_of_difficulty_changes'.
Open

            (new SpellTraitsTable(Tables::getIt()))->sumDifficultyChanges(

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'I_can_get_modifiers'.
Open

            $modifierCodes = $spellTraitsTable->getModifierCodes(SpellTraitCode::getIt($spellTraitValue));

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'I_can_get_modifiers'.
Open

        foreach (SpellTraitCode::getPossibleValues() as $spellTraitValue) {

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\ModifierCode' in method 'getModifierValuesFromModifiersTable'.
Open

            $spellTraitCodes = $modifiersTable->getSpellTraitCodes(ModifierCode::getIt($modifierValue));

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\FormulaCode' in method 'getExpectedFormulaValues'.
Open

        $expectedFormulaValues = array_diff(FormulaCode::getPossibleValues(), self::$impossibleFormulas[$spellTraitValue]);

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\FormulaCode' in method 'getFormulaValuesFromFormulasTable'.
Open

        foreach (FormulaCode::getPossibleValues() as $formulaValue) {

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'I_can_get_sum_of_difficulty_changes'.
Open

                    SpellTraitCode::getIt(SpellTraitCode::ODORLESS), // +3

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

Avoid using static access to class '\DrdPlus\Tables\Tables' in method 'getModifierValuesFromModifiersTable'.
Open

        $modifiersTable = new ModifiersTable(Tables::getIt());

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'I_can_get_sum_of_difficulty_changes'.
Open

                    SpellTraitCode::getIt(SpellTraitCode::DEFORMATION), // +3

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\ModifierCode' in method 'getExpectedModifierValues'.
Open

        $expectedModifierValues = array_diff(ModifierCode::getPossibleValues(), self::$impossibleModifiers[$spellTraitValue]);

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'I_can_get_formulas'.
Open

            $formulaCodes = $spellTraitsTable->getFormulaCodes(SpellTraitCode::getIt($spellTraitValue));

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

Avoid using static access to class '\DrdPlus\Codes\Theurgist\SpellTraitCode' in method 'I_can_get_sum_of_difficulty_changes'.
Open

                        [SpellTraitCode::getIt(SpellTraitCode::CYCLIC)], // +6

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

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

    public function I_can_get_modifiers()
    {
        $spellTraitsTable = new SpellTraitsTable(Tables::getIt());
        foreach (SpellTraitCode::getPossibleValues() as $spellTraitValue) {
            $modifierCodes = $spellTraitsTable->getModifierCodes(SpellTraitCode::getIt($spellTraitValue));
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 1 other location - About 4 hrs to fix
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 123..143

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 164.

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

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

    public function I_can_get_formulas()
    {
        $spellTraitsTable = new SpellTraitsTable(Tables::getIt());
        foreach (SpellTraitCode::getPossibleValues() as $spellTraitValue) {
            $formulaCodes = $spellTraitsTable->getFormulaCodes(SpellTraitCode::getIt($spellTraitValue));
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 1 other location - About 4 hrs to fix
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 35..55

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 164.

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

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

        SpellTraitCode::TRANSPARENCY => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::MULTIPLE_ENTRY => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::UNIDIRECTIONAL => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::STATE_CHANGE => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::ACTIVE => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76

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 117.

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

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

        SpellTraitCode::INACRID => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::SITUATIONAL => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::NO_SMOKE => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::NATURE_CHANGE => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::OMNIPRESENT => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::EVERY_SENSE => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 70..70
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::SHAPESHIFT => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 20 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 145..145
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 148..148
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 174..174
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 180..180
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 182..182
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 188..188
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 190..190
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 192..192
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 196..196
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 66..66
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 67..67
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 68..68
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 69..69
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 71..71
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 72..72
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 73..73
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 74..74
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 75..75
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 76..76
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 77..77

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 117.

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

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

        SpellTraitCode::MEMORY => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 28 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 146..146
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 206..206
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 210..210
tests/Tables/Theurgist/Spells/ModifiersTableTest.php on lines 169..169
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 176..176
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 177..177
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 178..178
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 179..179
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 181..181
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 183..183
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 184..184
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 185..185
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 186..186
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 187..187
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 189..189
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 191..191
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 193..193
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 194..194
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 197..197
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 200..200
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 202..202
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 58..58
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 59..59
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 60..60
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 61..61
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 62..62
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 64..64
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 65..65

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 111.

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

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

        SpellTraitCode::BIDIRECTIONAL => [ModifierCode::COLOR, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 28 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 146..146
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 206..206
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 210..210
tests/Tables/Theurgist/Spells/ModifiersTableTest.php on lines 169..169
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 176..176
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 177..177
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 178..178
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 179..179
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 181..181
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 183..183
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 184..184
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 185..185
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 186..186
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 187..187
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 189..189
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 191..191
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 193..193
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 194..194
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 197..197
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 200..200
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 202..202
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 58..58
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 59..59
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 60..60
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 61..61
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 62..62
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 63..63
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 64..64

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 111.

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

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

        SpellTraitCode::DEFORMATION => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 28 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 146..146
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 206..206
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 210..210
tests/Tables/Theurgist/Spells/ModifiersTableTest.php on lines 169..169
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 176..176
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 177..177
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 178..178
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 179..179
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 181..181
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 183..183
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 184..184
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 185..185
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 186..186
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 187..187
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 189..189
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 191..191
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 193..193
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 194..194
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 197..197
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 200..200
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 202..202
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 58..58
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 59..59
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 60..60
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 61..61
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 62..62
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 63..63
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 65..65

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 111.

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

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

        SpellTraitCode::SILENT => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 28 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 146..146
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 206..206
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 210..210
tests/Tables/Theurgist/Spells/ModifiersTableTest.php on lines 169..169
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 176..176
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 177..177
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 178..178
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 179..179
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 181..181
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 183..183
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 184..184
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 185..185
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 186..186
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 187..187
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 189..189
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 191..191
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 193..193
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 194..194
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 197..197
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 200..200
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 202..202
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 58..58
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 59..59
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 61..61
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 62..62
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 63..63
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 64..64
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 65..65

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 111.

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

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

        SpellTraitCode::INVISIBLE => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 28 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 146..146
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 206..206
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 210..210
tests/Tables/Theurgist/Spells/ModifiersTableTest.php on lines 169..169
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 176..176
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 177..177
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 178..178
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 179..179
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 181..181
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 183..183
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 184..184
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 185..185
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 186..186
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 187..187
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 189..189
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 191..191
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 193..193
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 194..194
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 197..197
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 200..200
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 202..202
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 58..58
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 60..60
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 61..61
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 62..62
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 63..63
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 64..64
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 65..65

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 111.

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

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

        SpellTraitCode::AFFECTING => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 28 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 146..146
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 206..206
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 210..210
tests/Tables/Theurgist/Spells/ModifiersTableTest.php on lines 169..169
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 176..176
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 177..177
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 178..178
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 179..179
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 181..181
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 183..183
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 184..184
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 185..185
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 186..186
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 187..187
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 189..189
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 191..191
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 193..193
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 194..194
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 197..197
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 200..200
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 202..202
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 59..59
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 60..60
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 61..61
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 62..62
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 63..63
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 64..64
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 65..65

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 111.

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

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

        SpellTraitCode::ODORLESS => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::INVISIBILITY, ModifierCode::MOVEMENT, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 28 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 146..146
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 206..206
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 210..210
tests/Tables/Theurgist/Spells/ModifiersTableTest.php on lines 169..169
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 176..176
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 177..177
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 178..178
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 179..179
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 181..181
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 183..183
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 184..184
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 185..185
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 186..186
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 187..187
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 189..189
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 191..191
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 193..193
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 194..194
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 197..197
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 200..200
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 202..202
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 58..58
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 59..59
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 60..60
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 62..62
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 63..63
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 64..64
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 65..65

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 111.

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

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

        SpellTraitCode::CYCLIC => [ModifierCode::COLOR, ModifierCode::GATE, ModifierCode::EXPLOSION, ModifierCode::FILTER, ModifierCode::WATCHER, ModifierCode::THUNDER, ModifierCode::INTERACTIVE_ILLUSION, ModifierCode::HAMMER, ModifierCode::CAMOUFLAGE, ModifierCode::INVISIBILITY, ModifierCode::BREACH, ModifierCode::RECEPTOR, ModifierCode::STEP_TO_FUTURE, ModifierCode::STEP_TO_PAST, ModifierCode::TRANSPOSITION, ModifierCode::RELEASE, ModifierCode::FRAGRANCE],
Severity: Major
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 28 other locations - About 1 hr to fix
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 146..146
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 206..206
tests/Tables/Theurgist/Spells/FormulasTableTest.php on lines 210..210
tests/Tables/Theurgist/Spells/ModifiersTableTest.php on lines 169..169
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 176..176
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 177..177
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 178..178
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 179..179
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 181..181
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 183..183
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 184..184
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 185..185
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 186..186
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 187..187
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 189..189
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 191..191
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 193..193
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 194..194
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 197..197
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 200..200
tests/Tables/Theurgist/Spells/ProfilesTableTest.php on lines 202..202
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 58..58
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 59..59
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 60..60
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 61..61
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 63..63
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 64..64
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 65..65

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 111.

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

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

    private function getExpectedModifierValues(string $spellTraitValue): array
    {
        $expectedModifierValues = array_diff(ModifierCode::getPossibleValues(), self::$impossibleModifiers[$spellTraitValue]);
        sort($expectedModifierValues);
        $modifierValuesFromModifiersTable = $this->getModifierValuesFromModifiersTable($spellTraitValue);
Severity: Minor
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 1 other location - About 35 mins to fix
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 172..185

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 92.

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

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

    private function getExpectedFormulaValues(string $spellTraitValue): array
    {
        $expectedFormulaValues = array_diff(FormulaCode::getPossibleValues(), self::$impossibleFormulas[$spellTraitValue]);
        sort($expectedFormulaValues);
        $formulaValuesFromFormulasTable = $this->getFormulaValuesFromFormulasTable($spellTraitValue);
Severity: Minor
Found in tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php and 1 other location - About 35 mins to fix
tests/Tables/Theurgist/Spells/SpellTraitsTableTest.php on lines 84..97

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 92.

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

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

        $expectedModifierValues = array_diff(ModifierCode::getPossibleValues(), self::$impossibleModifiers[$spellTraitValue]);

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 $modifierValuesFromModifiersTable. Keep variable name length under 20.
Open

        $modifierValuesFromModifiersTable = $this->getModifierValuesFromModifiersTable($spellTraitValue);

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 $formulaValuesFromFormulasTable. Keep variable name length under 20.
Open

        $formulaValuesFromFormulasTable = $this->getFormulaValuesFromFormulasTable($spellTraitValue);

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 $matchingModifierValues. Keep variable name length under 20.
Open

        $matchingModifierValues = [];

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 $possibleModifierValues. Keep variable name length under 20.
Open

            $possibleModifierValues = $this->getExpectedModifierValues($spellTraitValue);

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 $expectedFormulaValues. Keep variable name length under 20.
Open

        $expectedFormulaValues = array_diff(FormulaCode::getPossibleValues(), self::$impossibleFormulas[$spellTraitValue]);

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 $matchingFormulaValues. Keep variable name length under 20.
Open

        $matchingFormulaValues = [];

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 $collectedFormulaValues. Keep variable name length under 20.
Open

            $collectedFormulaValues = [];

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 $collectedModifierValues. Keep variable name length under 20.
Open

            $collectedModifierValues = [];

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 $possibleFormulaValues. Keep variable name length under 20.
Open

            $possibleFormulaValues = $this->getExpectedFormulaValues($spellTraitValue);

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

The method I_can_get_formulas is not named in camelCase.
Open

    public function I_can_get_formulas()
    {
        $spellTraitsTable = new SpellTraitsTable(Tables::getIt());
        foreach (SpellTraitCode::getPossibleValues() as $spellTraitValue) {
            $formulaCodes = $spellTraitsTable->getFormulaCodes(SpellTraitCode::getIt($spellTraitValue));

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method I_can_get_sum_of_difficulty_changes is not named in camelCase.
Open

    public function I_can_get_sum_of_difficulty_changes()
    {
        self::assertEquals(
            new DifficultyChange(18),
            (new SpellTraitsTable(Tables::getIt()))->sumDifficultyChanges(

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method I_can_get_modifiers is not named in camelCase.
Open

    public function I_can_get_modifiers()
    {
        $spellTraitsTable = new SpellTraitsTable(Tables::getIt());
        foreach (SpellTraitCode::getPossibleValues() as $spellTraitValue) {
            $modifierCodes = $spellTraitsTable->getModifierCodes(SpellTraitCode::getIt($spellTraitValue));

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status