jaroslavtyc/drd-plus-tables

View on GitHub
tests/Tables/Theurgist/Demons/DemonTest.php

Summary

Maintainability
F
5 days
Test Coverage

File DemonTest.php has 588 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php declare(strict_types=1);

namespace DrdPlus\Tests\Tables\Theurgist\Demons;

use DrdPlus\Codes\Theurgist\AffectionPeriodCode;
Severity: Major
Found in tests/Tables/Theurgist/Demons/DemonTest.php - About 1 day to fix

    DemonTest has 41 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DemonTest extends TestWithMockery
    {
        private static ?string $demonParameterNamespace = null;
        private static ?string $spellParameterNamespace = null;
    
    
    Severity: Minor
    Found in tests/Tables/Theurgist/Demons/DemonTest.php - About 5 hrs to fix

      The class DemonTest has 39 non-getter- and setter-methods. Consider refactoring DemonTest to keep number of methods under 25.
      Open

      class DemonTest extends TestWithMockery
      {
          private static ?string $demonParameterNamespace = null;
          private static ?string $spellParameterNamespace = null;
      
      

      TooManyMethods

      Since: 0.1

      A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      The default was changed from 10 to 25 in PHPMD 2.3.

      Example

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

      The class DemonTest has an overall complexity of 63 which is very high. The configured complexity threshold is 50.
      Open

      class DemonTest extends TestWithMockery
      {
          private static ?string $demonParameterNamespace = null;
          private static ?string $spellParameterNamespace = null;
      
      

      The class DemonTest has 20 public methods. Consider refactoring DemonTest to keep number of public methods under 10.
      Open

      class DemonTest extends TestWithMockery
      {
          private static ?string $demonParameterNamespace = null;
          private static ?string $spellParameterNamespace = null;
      
      

      TooManyPublicMethods

      Since: 0.1

      A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      Example

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

      Method I_can_create_it_with_addition_for_every_demon has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function I_can_create_it_with_addition_for_every_demon()
          {
              $parameterValues = [
                  DemonMutableParameterCode::DEMON_CAPACITY => 1,
                  DemonMutableParameterCode::DEMON_ENDURANCE => 2,
      Severity: Minor
      Found in tests/Tables/Theurgist/Demons/DemonTest.php - About 1 hr to fix

        Method I_get_required_realm_of_demon_with_traits has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function I_get_required_realm_of_demon_with_traits()
            {
                $demonCode = DemonCode::getIt(DemonCode::WARDEN);
                $demonsTable = $this->createDemonsTable();
        
        
        Severity: Minor
        Found in tests/Tables/Theurgist/Demons/DemonTest.php - About 1 hr to fix

          Method I_can_get_current_realms_affection has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function I_can_get_current_realms_affection()
              {
                  $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                  $demonsTable = $this->createDemonsTable();
                  $demonsTable->shouldReceive('getRealmsAffection')
          Severity: Minor
          Found in tests/Tables/Theurgist/Demons/DemonTest.php - About 1 hr to fix

            Method I_can_not_add_non_zero_addition_to_unused_parameter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function I_can_not_add_non_zero_addition_to_unused_parameter()
                {
                    $this->expectException(\DrdPlus\Tables\Theurgist\Demons\Exceptions\UnknownDemonParameter::class);
                    $this->expectExceptionMessageMatches('~4~');
                    $addParameterGetter = function (MockInterface $demonsTable, ?DemonKnack $demonKnack) {
            Severity: Minor
            Found in tests/Tables/Theurgist/Demons/DemonTest.php - About 1 hr to fix

              Method I_get_effective_realm_affected_by_parameters has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function I_get_effective_realm_affected_by_parameters()
                  {
                      $demonCode = DemonCode::getIt(DemonCode::GOLEM);
                      $demonsTable = $this->createDemonsTable();
                      $currentDifficultyIncrement = 1;
              Severity: Minor
              Found in tests/Tables/Theurgist/Demons/DemonTest.php - About 1 hr to fix

                The class DemonTest has a coupling between objects value of 30. Consider to reduce the number of dependencies under 13.
                Open

                class DemonTest extends TestWithMockery
                {
                    private static ?string $demonParameterNamespace = null;
                    private static ?string $spellParameterNamespace = null;
                
                

                CouplingBetweenObjects

                Since: 1.1.0

                A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

                Example

                class Foo {
                    /**
                     * @var \foo\bar\X
                     */
                    private $x = null;
                
                    /**
                     * @var \foo\bar\Y
                     */
                    private $y = null;
                
                    /**
                     * @var \foo\bar\Z
                     */
                    private $z = null;
                
                    public function setFoo(\Foo $foo) {}
                    public function setBar(\Bar $bar) {}
                    public function setBaz(\Baz $baz) {}
                
                    /**
                     * @return \SplObjectStorage
                     * @throws \OutOfRangeException
                     * @throws \InvalidArgumentException
                     * @throws \ErrorException
                     */
                    public function process(\Iterator $it) {}
                
                    // ...
                }

                Source https://phpmd.org/rules/design.html#couplingbetweenobjects

                Missing class import via use statement (line '41', column '51').
                Open

                            self::$demonParameterNamespace = (new \ReflectionClass(DemonStrength::class))->getNamespaceName();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

                Missing class import via use statement (line '44', column '51').
                Open

                            self::$spellParameterNamespace = (new \ReflectionClass(SpellSpeed::class))->getNamespaceName();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

                Missing class import via use statement (line '404', column '18').
                Open

                            [new \stdClass()]

                MissingImport

                Since: 2.7.0

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

                Example

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

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

                Avoid using static access to class '\Granam\String\StringTools' in method 'getDemonParameterClass'.
                Open

                        $parameterClassBasename = ucfirst(StringTools::assembleMethodName($demonParameterName));

                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\DemonTraitCode' in method 'I_can_ask_demon_if_has_unlimited_capacity'.
                Open

                            $nonUnlimitedCapacityDemonTraits[] = $this->createDemonTrait(DemonTraitCode::getIt($demonTraitCodeValue));

                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\DemonCode' in method 'I_can_create_it_with_addition_for_every_demon'.
                Open

                        foreach (DemonCode::getPossibleValues() as $demonValue) {

                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\DemonMutableParameterCode' in method 'I_can_create_it_with_addition_for_every_demon'.
                Open

                            foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {

                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\DemonTraitCode' in method 'I_can_ask_demon_if_has_unlimited_capacity'.
                Open

                                $this->createDemonTrait(DemonTraitCode::getIt(DemonTraitCode::CHEAP_UNLIMITED_CAPACITY)),

                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\DemonCode' in method 'I_can_get_base_realms_affection'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);

                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\DemonMutableParameterCode' in method 'I_can_create_it_without_any_change_of_a_demon'.
                Open

                        foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {

                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\DemonCode' in method 'I_can_ask_demon_if_has_unlimited_capacity'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);

                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\DemonTraitCode' in method 'I_get_required_realm_of_demon_with_traits'.
                Open

                            $demonTraitCode = DemonTraitCode::getIt($demonTraitName);

                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\DemonCode' in method 'I_can_create_it_with_addition_for_every_demon'.
                Open

                            $demonCode = DemonCode::getIt($demonValue);

                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\DemonCode' in method 'I_can_get_demon_body_code'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::WARDEN);

                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 '\Granam\String\StringTools' in method 'addParameterGetter'.
                Open

                        $getProperty = StringTools::assembleGetterForName($parameterName);

                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\DemonMutableParameterCode' in method 'I_get_null_for_unused_parameters_of_a_demon'.
                Open

                        foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {

                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\DemonCode' in method 'I_get_null_for_unused_parameters_of_a_demon'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);

                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_not_create_it_with_invalid_mutable_parameter'.
                Open

                        new Demon(DemonCode::getIt(DemonCode::WARDEN), Tables::getIt(), [DemonMutableParameterCode::DEMON_CAPACITY => 'indefinite'], []);

                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\DemonCode' in method 'I_can_get_demon_will'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);

                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\DemonCode' in method 'I_can_create_it_without_any_change_of_a_demon'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::IMP);

                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 '\Granam\String\StringTools' in method 'I_can_create_it_with_addition_for_every_demon'.
                Open

                                $getCurrentParameter = StringTools::assembleGetterForName('current' . $mutableParameterName);

                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\DemonCode' in method 'I_get_basic_difficulty_change_without_any_parameter'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::CRON);

                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\DemonMutableParameterCode' in method 'addEmptyParameterGetters'.
                Open

                        foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {

                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\DemonCode' in method 'I_can_get_demon_kind_code'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);

                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\DemonTraitCode' in method 'I_can_get_current_realms_affection'.
                Open

                        foreach (DemonTraitCode::getPossibleValues() as $demonTraitValue) {

                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\DemonTraitCode' in method 'I_can_ask_demon_if_has_unlimited_endurance'.
                Open

                            $nonUnlimitedEnduranceDemonTraits[] = $this->createDemonTrait(DemonTraitCode::getIt($demonTraitCodeValue));

                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\DemonTraitCode' in method 'I_can_ask_demon_if_has_unlimited_capacity'.
                Open

                                $this->createDemonTrait(DemonTraitCode::getIt(DemonTraitCode::UNLIMITED_CAPACITY)),

                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\DemonCode' in method 'I_can_not_add_non_zero_addition_to_unused_parameter'.
                Open

                            DemonCode::getIt(DemonCode::DEADY),

                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\DemonMutableParameterCode' in method 'I_get_current_difficulty_affected_by_parameters'.
                Open

                        foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {

                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\DemonMutableParameterCode' in method 'I_get_effective_realm_affected_by_parameters'.
                Open

                        foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {

                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 '\Granam\String\StringTools' in method 'I_can_create_it_without_any_change_of_a_demon'.
                Open

                            $getCurrentParameter = StringTools::assembleGetterForName('current' . ucfirst($mutableParameterName));

                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\DemonCode' in method 'I_can_not_create_it_with_unknown_parameter'.
                Open

                            DemonCode::getIt(DemonCode::GOLEM),

                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\DemonCode' in method 'I_get_effective_realm_affected_by_parameters'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::GOLEM);

                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\DemonTraitCode' in method 'I_can_ask_demon_if_has_unlimited_endurance'.
                Open

                            [$this->createDemonTrait(DemonTraitCode::getIt(DemonTraitCode::UNLIMITED_ENDURANCE))]

                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\DemonMutableParameterCode' in method 'I_can_create_it_with_addition_for_every_demon'.
                Open

                        $missedParameters = array_diff(DemonMutableParameterCode::getPossibleValues(), array_keys($parameterValues));

                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\DemonCode' in method 'I_can_ask_demon_if_has_unlimited_endurance'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);

                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\DemonTraitCode' in method 'I_can_ask_demon_if_has_unlimited_capacity'.
                Open

                        foreach (DemonTraitCode::getPossibleValues() as $demonTraitCodeValue) {

                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\DemonCode' in method 'I_get_required_realm_of_demon_with_traits'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::WARDEN);

                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\DemonCode' in method 'I_can_get_current_realms_affection'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);

                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\DemonTraitCode' in method 'I_can_ask_demon_if_has_unlimited_endurance'.
                Open

                        foreach (DemonTraitCode::getPossibleValues() as $demonTraitCodeValue) {

                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\DemonMutableParameterCode' in method 'I_can_create_it_with_addition_for_every_demon'.
                Open

                            foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {

                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\DemonCode' in method 'I_get_current_difficulty_affected_by_parameters'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::DEMON_GAMBLER);

                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\DemonCode' in method 'I_get_required_realm_of_demon_without_traits'.
                Open

                        $demonCode = DemonCode::getIt(DemonCode::WARDEN);

                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\DemonTraitCode' in method 'I_get_required_realm_of_demon_with_traits'.
                Open

                        foreach (DemonTraitCode::getPossibleValues() as $demonTraitName) {

                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\DemonCode' in method 'I_can_not_create_it_with_invalid_demon_trait'.
                Open

                            DemonCode::getIt(DemonCode::IMP),

                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\DemonCode' in method 'I_can_not_create_it_with_invalid_mutable_parameter'.
                Open

                        new Demon(DemonCode::getIt(DemonCode::WARDEN), Tables::getIt(), [DemonMutableParameterCode::DEMON_CAPACITY => 'indefinite'], []);

                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 '\Granam\String\StringTools' in method 'I_get_null_for_unused_parameters_of_a_demon'.
                Open

                            $getCurrentParameter = StringTools::assembleGetterForName('current' . $mutableParameterName);

                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\DemonCode' in method 'I_can_get_current_evocation'.
                Open

                        $demon = $this->createDemon($demonCode = DemonCode::getIt(DemonCode::DEADY), $this->createTables($demonsTable));

                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\DemonCode' in method 'I_can_not_add_non_zero_addition_to_unused_parameter'.
                Open

                                DemonCode::getIt(DemonCode::DEADY),

                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\DemonTraitCode' in method 'I_can_get_current_realms_affection'.
                Open

                            $demonTraitCode = DemonTraitCode::getIt($demonTraitValue);

                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 unused local variables such as '$additionByDifficulty'.
                Open

                                ->andReturn($additionByDifficulty = $this->createAdditionByDifficulty($currentDifficultyIncrement));

                UnusedLocalVariable

                Since: 0.2

                Detects when a local variable is declared and/or assigned, but not used.

                Example

                class Foo {
                    public function doSomething()
                    {
                        $i = 5; // Unused
                    }
                }

                Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                Avoid unused local variables such as '$realmsAffection'.
                Open

                            ->andReturn($realmsAffection = $this->createRealmsAffection(-1, AffectionPeriodCode::LIFE));

                UnusedLocalVariable

                Since: 0.2

                Detects when a local variable is declared and/or assigned, but not used.

                Example

                class Foo {
                    public function doSomething()
                    {
                        $i = 5; // Unused
                    }
                }

                Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                Avoid unused local variables such as '$additionByDifficulty'.
                Open

                                ->andReturn($additionByDifficulty = $this->createAdditionByDifficulty($currentDifficultyIncrement));

                UnusedLocalVariable

                Since: 0.2

                Detects when a local variable is declared and/or assigned, but not used.

                Example

                class Foo {
                    public function doSomething()
                    {
                        $i = 5; // Unused
                    }
                }

                Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

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

                        foreach (DemonCode::getPossibleValues() as $demonValue) {
                            $demonCode = DemonCode::getIt($demonValue);
                            $demonsTable = $this->createDemonsTable();
                            $baseParameters = [];
                            foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {
                Severity: Major
                Found in tests/Tables/Theurgist/Demons/DemonTest.php and 1 other location - About 1 day to fix
                tests/Tables/Theurgist/Spells/FormulaTest.php on lines 322..352

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

                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 3 locations. Consider refactoring.
                Open

                    public function I_can_get_demon_kind_code()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $demonsTable->shouldReceive('getDemonKindCode')
                Severity: Major
                Found in tests/Tables/Theurgist/Demons/DemonTest.php and 2 other locations - About 1 hr to fix
                tests/Tables/Theurgist/Demons/DemonTest.php on lines 671..681
                tests/Tables/Theurgist/Demons/DemonTest.php on lines 717..727

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

                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 3 locations. Consider refactoring.
                Open

                    public function I_can_get_base_realms_affection()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $demonsTable->shouldReceive('getRealmsAffection')
                Severity: Major
                Found in tests/Tables/Theurgist/Demons/DemonTest.php and 2 other locations - About 1 hr to fix
                tests/Tables/Theurgist/Demons/DemonTest.php on lines 671..681
                tests/Tables/Theurgist/Demons/DemonTest.php on lines 686..696

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

                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 3 locations. Consider refactoring.
                Open

                    public function I_can_get_demon_body_code()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::WARDEN);
                        $demonsTable = $this->createDemonsTable();
                        $demonsTable->shouldReceive('getDemonBodyCode')
                Severity: Major
                Found in tests/Tables/Theurgist/Demons/DemonTest.php and 2 other locations - About 1 hr to fix
                tests/Tables/Theurgist/Demons/DemonTest.php on lines 686..696
                tests/Tables/Theurgist/Demons/DemonTest.php on lines 717..727

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

                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 addDemonChangedDifficultyGetter(
                        MockInterface $demonTable,
                        DemonCode $expectedDemonCode,
                        int $expectedDifficultyChange,
                        Difficulty $demonChangedDifficulty = null
                Severity: Major
                Found in tests/Tables/Theurgist/Demons/DemonTest.php and 1 other location - About 1 hr to fix
                tests/Tables/Theurgist/Spells/FormulaTest.php on lines 404..417

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

                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

                        foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {
                            $parameter = $this->createParameter($mutableParameterName);
                            $parameter->shouldReceive('getWithAddition')
                                ->with(0)
                                ->andReturn($parameter); // no change here
                Severity: Minor
                Found in tests/Tables/Theurgist/Demons/DemonTest.php and 1 other location - About 1 hr to fix
                tests/Tables/Theurgist/Demons/DemonTest.php on lines 585..595

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 100.

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

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

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

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

                Refactorings

                Further Reading

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

                    public function I_can_get_current_evocation()
                    {
                        $demonsTable = $this->createDemonsTable();
                        $demon = $this->createDemon($demonCode = DemonCode::getIt(DemonCode::DEADY), $this->createTables($demonsTable));
                        $demonsTable->shouldReceive('getEvocation')
                Severity: Minor
                Found in tests/Tables/Theurgist/Demons/DemonTest.php and 1 other location - About 1 hr to fix
                tests/Tables/Theurgist/Spells/FormulaTest.php on lines 555..563

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 100.

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

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

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

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

                Refactorings

                Further Reading

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

                        foreach (DemonMutableParameterCode::getPossibleValues() as $mutableParameterName) {
                            $parameter = $this->createParameter($mutableParameterName);
                            $parameter->shouldReceive('getWithAddition')
                                ->with(0)
                                ->andReturn($parameter); // no change here
                Severity: Minor
                Found in tests/Tables/Theurgist/Demons/DemonTest.php and 1 other location - About 1 hr to fix
                tests/Tables/Theurgist/Demons/DemonTest.php on lines 427..437

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 100.

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

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

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

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

                Refactorings

                Further Reading

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

                        $parameterClassBasename = ucfirst(StringTools::assembleMethodName($demonParameterName));

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

                        int $expectedDifficultyChange,

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

                        $demonTraitRealmsAdditionValue = $demonRequiredRealmValue + 1; // just a little bit higher

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

                        $nonUnlimitedCapacityDemonTraits = [];

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

                    private function createAdditionByDifficulty(int $currentDifficultyIncrement = null): AdditionByDifficulty

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

                    private static ?string $demonParameterNamespace = null;

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

                        Difficulty $demonChangedDifficulty = null

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

                        $demonTraitRealmsAdditionSum = 0;

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

                    private static ?string $spellParameterNamespace = null;

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

                    private function createRealmsAffection(int $realmsChange, string $affectionPeriodCodeValue = null): RealmsAffection

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

                        $nonUnlimitedEnduranceDemonTraits = [];

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

                    private function createDifficulty(int $currentRealmsIncrement = null): Difficulty

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

                        $currentDifficultyIncrement = 1;

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

                        $realmsIncrementByDifficulty = 123456;

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

                        $expectedDifficultyChange = 0;

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

                        $currentDifficultyIncrement = 1;

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

                        $realmsAffectionValueSum = 0;

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

                        $realmsIncrementByDifficulty = 123456;

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

                        $expectedDifficultyChange = 0;

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

                        int $expectedRealmsIncrement,

                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_ask_demon_if_has_unlimited_endurance is not named in camelCase.
                Open

                    public function I_can_ask_demon_if_has_unlimited_endurance()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $nonUnlimitedEnduranceDemonTraits = [];

                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_current_evocation is not named in camelCase.
                Open

                    public function I_can_get_current_evocation()
                    {
                        $demonsTable = $this->createDemonsTable();
                        $demon = $this->createDemon($demonCode = DemonCode::getIt(DemonCode::DEADY), $this->createTables($demonsTable));
                        $demonsTable->shouldReceive('getEvocation')

                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_not_create_it_with_unknown_parameter is not named in camelCase.
                Open

                    public function I_can_not_create_it_with_unknown_parameter()
                    {
                        $this->expectException(\DrdPlus\Tables\Theurgist\Demons\Exceptions\UnknownDemonParameter::class);
                        $this->expectExceptionMessageMatches('~fat~');
                        new Demon(

                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_get_current_difficulty_affected_by_parameters is not named in camelCase.
                Open

                    public function I_get_current_difficulty_affected_by_parameters()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_GAMBLER);
                        $demonsTable = $this->createDemonsTable();
                        $currentDifficultyIncrement = 1;

                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_get_effective_realm_affected_by_parameters is not named in camelCase.
                Open

                    public function I_get_effective_realm_affected_by_parameters()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::GOLEM);
                        $demonsTable = $this->createDemonsTable();
                        $currentDifficultyIncrement = 1;

                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_not_create_it_with_invalid_mutable_parameter is not named in camelCase.
                Open

                    public function I_can_not_create_it_with_invalid_mutable_parameter()
                    {
                        $this->expectException(\DrdPlus\Tables\Theurgist\Demons\Exceptions\InvalidValueForDemonParameter::class);
                        $this->expectExceptionMessageMatches('~indefinite~');
                        new Demon(DemonCode::getIt(DemonCode::WARDEN), Tables::getIt(), [DemonMutableParameterCode::DEMON_CAPACITY => 'indefinite'], []);

                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_not_create_it_with_invalid_demon_trait is not named in camelCase.
                Open

                    public function I_can_not_create_it_with_invalid_demon_trait()
                    {
                        $this->expectException(\DrdPlus\Tables\Theurgist\Demons\Exceptions\InvalidDemonTrait::class);
                        $this->expectExceptionMessageMatches('~stdClass~');
                        new Demon(

                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_create_it_without_any_change_of_a_demon is not named in camelCase.
                Open

                    public function I_can_create_it_without_any_change_of_a_demon()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::IMP);
                        $demonsTable = $this->createDemonsTable();
                        $demon = $this->createDemon($demonCode, $this->createTables($demonsTable));

                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_create_it_with_addition_for_every_demon is not named in camelCase.
                Open

                    public function I_can_create_it_with_addition_for_every_demon()
                    {
                        $parameterValues = [
                            DemonMutableParameterCode::DEMON_CAPACITY => 1,
                            DemonMutableParameterCode::DEMON_ENDURANCE => 2,

                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_current_realms_affection is not named in camelCase.
                Open

                    public function I_can_get_current_realms_affection()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $demonsTable->shouldReceive('getRealmsAffection')

                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_ask_demon_if_has_unlimited_capacity is not named in camelCase.
                Open

                    public function I_can_ask_demon_if_has_unlimited_capacity()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $nonUnlimitedCapacityDemonTraits = [];

                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_demon_kind_code is not named in camelCase.
                Open

                    public function I_can_get_demon_kind_code()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $demonsTable->shouldReceive('getDemonKindCode')

                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_get_null_for_unused_parameters_of_a_demon is not named in camelCase.
                Open

                    public function I_get_null_for_unused_parameters_of_a_demon()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $demon = $this->createDemon($demonCode, $this->createTables($demonsTable));

                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_get_required_realm_of_demon_without_traits is not named in camelCase.
                Open

                    public function I_get_required_realm_of_demon_without_traits()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::WARDEN);
                        $demonsTable = $this->createDemonsTable();
                        $this->addEmptyParameterGetters($demonsTable, $demonCode);

                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_demon_body_code is not named in camelCase.
                Open

                    public function I_can_get_demon_body_code()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::WARDEN);
                        $demonsTable = $this->createDemonsTable();
                        $demonsTable->shouldReceive('getDemonBodyCode')

                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_demon_will is not named in camelCase.
                Open

                    public function I_can_get_demon_will()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $demonsTable->shouldReceive('getDemonWill')

                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_base_realms_affection is not named in camelCase.
                Open

                    public function I_can_get_base_realms_affection()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::DEMON_OF_MOVEMENT);
                        $demonsTable = $this->createDemonsTable();
                        $demonsTable->shouldReceive('getRealmsAffection')

                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_get_basic_difficulty_change_without_any_parameter is not named in camelCase.
                Open

                    public function I_get_basic_difficulty_change_without_any_parameter()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::CRON);
                        $demonsTable = $this->createDemonsTable();
                        $this->addEmptyParameterGetters($demonsTable, $demonCode);

                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_not_add_non_zero_addition_to_unused_parameter is not named in camelCase.
                Open

                    public function I_can_not_add_non_zero_addition_to_unused_parameter()
                    {
                        $this->expectException(\DrdPlus\Tables\Theurgist\Demons\Exceptions\UnknownDemonParameter::class);
                        $this->expectExceptionMessageMatches('~4~');
                        $addParameterGetter = function (MockInterface $demonsTable, ?DemonKnack $demonKnack) {

                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_get_required_realm_of_demon_with_traits is not named in camelCase.
                Open

                    public function I_get_required_realm_of_demon_with_traits()
                    {
                        $demonCode = DemonCode::getIt(DemonCode::WARDEN);
                        $demonsTable = $this->createDemonsTable();
                
                

                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