jaroslavtyc/drd-plus-health

View on GitHub
tests/Health/HealthTest.php

Summary

Maintainability
F
1 wk
Test Coverage

File HealthTest.php has 1250 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php declare(strict_types=1);

namespace DrdPlus\Tests\Health;

use DrdPlus\Codes\Body\OrdinaryWoundOriginCode;
Severity: Major
Found in tests/Health/HealthTest.php - About 3 days to fix

    HealthTest has 64 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class HealthTest extends TestWithMockery
    {
        /**
         * @test
         */
    Severity: Major
    Found in tests/Health/HealthTest.php - About 1 day to fix

      The class HealthTest has 50 public methods. Consider refactoring HealthTest to keep number of public methods under 10.
      Open

      class HealthTest extends TestWithMockery
      {
          /**
           * @test
           */
      Severity: Minor
      Found in tests/Health/HealthTest.php by phpmd

      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

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

      class HealthTest extends TestWithMockery
      {
          /**
           * @test
           */
      Severity: Minor
      Found in tests/Health/HealthTest.php by phpmd

      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 HealthTest has an overall complexity of 82 which is very high. The configured complexity threshold is 50.
      Open

      class HealthTest extends TestWithMockery
      {
          /**
           * @test
           */
      Severity: Minor
      Found in tests/Health/HealthTest.php by phpmd

      Method I_can_be_wounded_both_ordinary_and_seriously has 74 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function I_can_be_wounded_both_ordinary_and_seriously(): void
          {
              $ordinaryWoundsSize = 0;
              $seriousWoundsSize = 0;
              $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
      Severity: Major
      Found in tests/Health/HealthTest.php - About 2 hrs to fix

        Method I_can_be_seriously_wounded has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function I_can_be_seriously_wounded(): void
            {
                $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(6));
        
                $seriousWoundByStab = $health->addWound(
        Severity: Major
        Found in tests/Health/HealthTest.php - About 2 hrs to fix

          Method I_can_get_healed_serious_wounds has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function I_can_get_healed_serious_wounds(): void
              {
                  $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(6));
          
                  $seriousWoundByStab = $health->addWound(
          Severity: Major
          Found in tests/Health/HealthTest.php - About 2 hrs to fix

            Method I_can_be_ordinary_wounded has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function I_can_be_ordinary_wounded(): void
                {
                    $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                    $ordinaryWound = $health->addWound(
                        $this->createWoundSize(2),
            Severity: Minor
            Found in tests/Health/HealthTest.php - About 1 hr to fix

              Method I_can_ask_it_if_may_suffer_from_wounds has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function I_can_ask_it_if_may_suffer_from_wounds(): void
                  {
                      $woundBoundary = $this->createWoundBoundary(5);
                      $health = $this->createHealthToTest($woundBoundary);
                      self::assertFalse($health->maySufferFromWounds($woundBoundary));
              Severity: Minor
              Found in tests/Health/HealthTest.php - About 1 hr to fix

                Method I_can_ask_it_if_I_am_suffering_from_wounds has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function I_can_ask_it_if_I_am_suffering_from_wounds(): void
                    {
                        $woundBoundary = $this->createWoundBoundary(5);
                        $health = $this->createHealthToTest($woundBoundary);
                        self::assertFalse($health->mayHaveMalusFromWounds($woundBoundary));
                Severity: Minor
                Found in tests/Health/HealthTest.php - About 1 hr to fix

                  Method Malus_can_increase_on_fresh_wound has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function Malus_can_increase_on_fresh_wound(int $willValue, int $rollValue, int $expectedMalus): void
                      {
                          $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                  
                          $health->addWound(
                  Severity: Minor
                  Found in tests/Health/HealthTest.php - About 1 hr to fix

                    Method Malus_can_not_decrease_on_fresh_wound has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function Malus_can_not_decrease_on_fresh_wound(int $willValue, int $rollValue, int $expectedMalus): void
                        {
                            $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                    
                            $health->addWound($this->createWoundSize(5),
                    Severity: Minor
                    Found in tests/Health/HealthTest.php - About 1 hr to fix

                      Method I_can_be_ordinary_healed has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function I_can_be_ordinary_healed(): void
                          {
                              $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(7));
                      
                              $health->addWound($this->createWoundSize(1),
                      Severity: Minor
                      Found in tests/Health/HealthTest.php - About 1 hr to fix

                        Method I_should_roll_against_malus_from_wounds_because_of_heal_of_ordinary_wound has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function I_should_roll_against_malus_from_wounds_because_of_heal_of_ordinary_wound($willValue, $rollValue, $expectedMalus): void
                            {
                                $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                $health->addWound($this->createWoundSize(4),
                                    SeriousWoundOriginCode::getElementalWoundOrigin(),
                        Severity: Minor
                        Found in tests/Health/HealthTest.php - About 1 hr to fix

                          The class HealthTest has 50 public methods and attributes. Consider reducing the number of public items to less than 45.
                          Open

                          class HealthTest extends TestWithMockery
                          {
                              /**
                               * @test
                               */
                          Severity: Minor
                          Found in tests/Health/HealthTest.php by phpmd

                          ExcessivePublicCount

                          Since: 0.1

                          A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

                          Example

                          public class Foo {
                              public $value;
                              public $something;
                              public $var;
                              // [... more more public attributes ...]
                          
                              public function doWork() {}
                              public function doMoreWork() {}
                              public function doWorkAgain() {}
                              // [... more more public methods ...]
                          }

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

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

                              public function I_can_not_heal_already_treated_serious_wound(): void
                              {
                                  $this->expectException(\DrdPlus\Health\Exceptions\ExpectedFreshWoundToHeal::class);
                                  $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                  $seriousWound = $health->addWound(
                          Severity: Minor
                          Found in tests/Health/HealthTest.php - About 1 hr to fix

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

                                public function Malus_is_not_increased_on_new_heal_by_worse_roll(): void
                                {
                                    $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                    self::assertSame(0, $health->getSignificantMalusFromPains($woundBoundary));
                            
                            
                            Severity: Minor
                            Found in tests/Health/HealthTest.php - About 1 hr to fix

                              The class HealthTest has 1569 lines of code. Current threshold is 1000. Avoid really long classes.
                              Open

                              class HealthTest extends TestWithMockery
                              {
                                  /**
                                   * @test
                                   */
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                              class HealthTest extends TestWithMockery
                              {
                                  /**
                                   * @test
                                   */
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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 '1112', column '33').
                              Open

                                      $healthReflection = new \ReflectionClass($health);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              MissingImport

                              Since: 2.7.0

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

                              Example

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

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

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

                                  private function createGlare($malus = -123, $isShined = true)
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              BooleanArgumentFlag

                              Since: 1.4.0

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

                              Example

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

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

                              Avoid using static access to class '\DrdPlus\Health\ReasonToRollAgainstMalusFromWounds' in method 'I_should_roll_against_malus_from_wounds_because_of_heal_of_serious_wound'.
                              Open

                                      self::assertSame(ReasonToRollAgainstMalusFromWounds::getHealReason(), $health->getReasonToRollAgainstMalusFromWounds());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'Malus_can_increase_on_fresh_wound'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'Malus_is_not_increased_on_new_heal_by_worse_roll'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_healed_serious_wounds'.
                              Open

                                          $seriousWoundOrigin = SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_get_highest_malus_from_wound_and_pains'.
                              Open

                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_should_roll_against_malus_from_wounds_because_of_heal_of_serious_wound'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_add_new_wound_if_roll_on_malus_expected'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_heal_serious_wound_if_roll_on_malus_expected'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_get_malus_from_wounds_if_roll_on_it_expected'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'Malus_is_not_increased_on_new_heal_by_worse_roll'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_add_affliction'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_may_suffer_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_may_suffer_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_get_treatment_boundary_increased_by_serious_wound_immediately'.
                              Open

                                      $health->addWound($this->createWoundSize(7), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                      $health->regenerate(HealingPower::createForTreatment(9, $this->createToughness(-1), Tables::getIt()), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Health\ReasonToRollAgainstMalusFromWounds' in method 'I_should_roll_against_malus_from_wounds_because_of_heal_of_ordinary_wound'.
                              Open

                                      self::assertSame(ReasonToRollAgainstMalusFromWounds::getHealReason(), $health->getReasonToRollAgainstMalusFromWounds());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_heal_fresh_ordinary_wounds_if_roll_on_malus_expected'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_ordinary_healed'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalStabWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_all_pains_and_afflictions'.
                              Open

                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Health\Inflictions\Glared' in method 'I_can_be_glared'.
                              Open

                                      self::assertEquals(Glared::createWithoutGlare($health), $health->getGlared());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_healed_serious_wounds'.
                              Open

                                          $seriousWoundOrigin = SeriousWoundOriginCode::getMechanicalStabWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_should_roll_against_malus_from_wounds_because_of_regeneration'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'Malus_can_increase_on_fresh_wound'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_ordinary_wounded'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_easily_find_out_if_may_have_malus_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_add_new_wound_if_roll_on_malus_expected'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'Malus_can_not_decrease_on_fresh_wound'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_ordinary_wounded'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_ordinary_healed'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_wounded_both_ordinary_and_seriously'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_strength_malus_from_afflictions'.
                              Open

                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_charisma_malus_from_afflictions'.
                              Open

                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_get_treatment_boundary_lowered_by_healed_serious_wound'.
                              Open

                                      $seriousWound = $health->addWound($this->createWoundSize(7), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_get_treatment_boundary_lowered_by_regenerated_amount'.
                              Open

                                      $health->addWound($this->createWoundSize(3), SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'Malus_is_not_increased_on_new_heal_by_worse_roll'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_wounded_both_ordinary_and_seriously'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_easily_find_out_if_may_have_malus_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_regenerate_if_roll_on_malus_expected'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_heal_serious_wound_not_created_by_current_health'.
                              Open

                                      $seriousWound = new SeriousWound($health, $this->createWoundSize(5), SeriousWoundOriginCode::getMechanicalCutWoundOrigin());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_will_malus_from_afflictions'.
                              Open

                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_do_not_have_lowered_treatment_boundary_by_healed_ordinary_wound'.
                              Open

                                      $health->addWound($this->createWoundSize(3), SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_should_roll_against_malus_from_wounds_because_of_new_wound'.
                              Open

                                      $health->addWound($this->createWoundSize(10), SeriousWoundOriginCode::getElementalWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_should_roll_against_malus_from_wounds_because_of_heal_of_ordinary_wound'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_should_roll_against_malus_from_wounds_because_of_heal_of_ordinary_wound'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_heal_fresh_ordinary_wounds_if_roll_on_malus_expected'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_add_same_affliction_twice'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin()
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_heal_serious_wound_from_different_health'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCutWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_easily_find_out_if_creature_is_conscious_and_alive'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_heal_fresh_ordinary_wounds_if_roll_on_malus_expected'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\OrdinaryWoundOriginCode' in method 'I_can_be_ordinary_wounded'.
                              Open

                                          OrdinaryWoundOriginCode::getIt(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_wounded_both_ordinary_and_seriously'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_knack_malus_from_afflictions'.
                              Open

                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_get_treatment_boundary_lowered_by_regenerated_amount'.
                              Open

                                      $health->addWound($this->createWoundSize(6), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Health\HealingPower' in method 'I_can_be_ordinary_healed'.
                              Open

                                              HealingPower::createForTreatment(4, $this->createToughness(-3), Tables::getIt()),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_heal_old_serious_wound'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCutWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_has_fresh_wounds'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Health\HealingPower' in method 'I_get_treatment_boundary_lowered_by_regenerated_amount'.
                              Open

                                      $health->regenerate(HealingPower::createForTreatment(9, $this->createToughness(-1), Tables::getIt()), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_should_roll_against_malus_from_wounds_because_of_heal_of_ordinary_wound'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_add_affliction_with_to_health_unknown_wound'.
                              Open

                                          SeriousWoundOriginCode::getElementalWoundOrigin()
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                              HealingPower::createForTreatment(4, $this->createToughness(-3), Tables::getIt()),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_not_heal_already_treated_serious_wound'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCutWoundOrigin()
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'Malus_can_not_decrease_on_fresh_wound'.
                              Open

                                              SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_ordinary_healed'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_seriously_wounded'.
                              Open

                                          $seriousWoundOrigin = SeriousWoundOriginCode::getMechanicalStabWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_wounded_both_ordinary_and_seriously'.
                              Open

                                          SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_intelligence_malus_from_afflictions'.
                              Open

                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Health\ReasonToRollAgainstMalusFromWounds' in method 'I_should_roll_against_malus_from_wounds_because_of_regeneration'.
                              Open

                                      self::assertSame(ReasonToRollAgainstMalusFromWounds::getHealReason(), $health->getReasonToRollAgainstMalusFromWounds());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'createSeriousWound'.
                              Open

                                          ->andReturn(SeriousWoundOriginCode::getMechanicalCrushWoundOrigin());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_be_seriously_wounded'.
                              Open

                                          $seriousWoundOrigin = SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Health\ReasonToRollAgainstMalusFromWounds' in method 'I_can_be_seriously_wounded'.
                              Open

                                      self::assertSame(ReasonToRollAgainstMalusFromWounds::getWoundReason(), $health->getReasonToRollAgainstMalusFromWounds());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_get_treatment_boundary_moved_to_reaming_wounds_on_ordinary_heal'.
                              Open

                                      $health->addWound($this->createWoundSize(4), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Health\Inflictions\Glared' in method 'I_can_be_glared'.
                              Open

                                      self::assertEquals(Glared::createFromGlare($glare, $health), $health->getGlared());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_I_am_suffering_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_do_not_have_lowered_treatment_boundary_by_healed_ordinary_wound'.
                              Open

                                      $health->addWound($this->createWoundSize(6), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Health\ReasonToRollAgainstMalusFromWounds' in method 'I_should_roll_against_malus_from_wounds_because_of_new_wound'.
                              Open

                                      self::assertSame(ReasonToRollAgainstMalusFromWounds::getWoundReason(), $health->getReasonToRollAgainstMalusFromWounds());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\OrdinaryWoundOriginCode' in method 'I_can_be_ordinary_wounded'.
                              Open

                                          OrdinaryWoundOriginCode::getIt(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_get_agility_malus_from_afflictions'.
                              Open

                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_I_am_suffering_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_I_am_suffering_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_I_am_suffering_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_may_suffer_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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\Body\SeriousWoundOriginCode' in method 'I_can_ask_it_if_may_suffer_from_wounds'.
                              Open

                                          SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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 '$woundBoundary'.
                              Open

                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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 '$seriousWoundOrigin'.
                              Open

                                          $seriousWoundOrigin = SeriousWoundOriginCode::getMechanicalStabWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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

                                  public function I_can_ask_it_if_I_am_suffering_from_wounds(): void
                                  {
                                      $woundBoundary = $this->createWoundBoundary(5);
                                      $health = $this->createHealthToTest($woundBoundary);
                                      self::assertFalse($health->mayHaveMalusFromWounds($woundBoundary));
                              Severity: Major
                              Found in tests/Health/HealthTest.php and 1 other location - About 1 day to fix
                              tests/Health/HealthTest.php on lines 1504..1547

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

                              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_ask_it_if_may_suffer_from_wounds(): void
                                  {
                                      $woundBoundary = $this->createWoundBoundary(5);
                                      $health = $this->createHealthToTest($woundBoundary);
                                      self::assertFalse($health->maySufferFromWounds($woundBoundary));
                              Severity: Major
                              Found in tests/Health/HealthTest.php and 1 other location - About 1 day to fix
                              tests/Health/HealthTest.php on lines 1552..1595

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

                              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_knack_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Major
                              Found in tests/Health/HealthTest.php and 2 other locations - About 3 hrs to fix
                              tests/Health/HealthTest.php on lines 1366..1378
                              tests/Health/HealthTest.php on lines 1400..1412

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

                              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_agility_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Major
                              Found in tests/Health/HealthTest.php and 2 other locations - About 3 hrs to fix
                              tests/Health/HealthTest.php on lines 1383..1395
                              tests/Health/HealthTest.php on lines 1400..1412

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

                              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_will_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Major
                              Found in tests/Health/HealthTest.php and 2 other locations - About 3 hrs to fix
                              tests/Health/HealthTest.php on lines 1366..1378
                              tests/Health/HealthTest.php on lines 1383..1395

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

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

                                          $decreasedHealingPower = $this->mockery(HealingPower::class);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              LongVariable

                              Since: 0.2

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

                              Example

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

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

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

                                          $currentlyExpectedMalus = max(0, min(3, (int)floor(($currentWillValue + $currentRollValue) / 5))) - 3; // 0; -1; -2; -3
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              LongVariable

                              Since: 0.2

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

                              Example

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

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

                              The method I_get_treatment_boundary_moved_to_reaming_wounds_on_ordinary_heal is not named in camelCase.
                              Open

                                  public function I_get_treatment_boundary_moved_to_reaming_wounds_on_ordinary_heal(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      self::assertSame(0, $health->getTreatmentBoundary()->getValue());
                                      $health->addWound($this->createWoundSize(4), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_get_treatment_boundary_lowered_by_healed_serious_wound(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      self::assertSame(0, $health->getTreatmentBoundary()->getValue());
                                      $seriousWound = $health->addWound($this->createWoundSize(7), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_heal_old_serious_wound(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\ExpectedFreshWoundToHeal::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $seriousWound = $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_heal_already_treated_serious_wound(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\ExpectedFreshWoundToHeal::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $seriousWound = $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_ask_it_if_has_fresh_wounds(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      self::assertFalse($health->hasFreshWounds());
                                      $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_be_wounded_both_ordinary_and_seriously(): void
                                  {
                                      $ordinaryWoundsSize = 0;
                                      $seriousWoundsSize = 0;
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_be_glared(): void
                                  {
                                      $health = new Health();
                                      self::assertEquals(Glared::createWithoutGlare($health), $health->getGlared());
                                      $health->inflictByGlare($glare = $this->createGlare());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_easily_find_out_if_may_have_malus_from_wounds(): void
                                  {
                                      $health = new Health();
                                      self::assertFalse($health->mayHaveMalusFromWounds($woundBoundary = $this->createWoundBoundary(10)));
                                      $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_add_affliction(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $wound = $health->addWound($this->createWoundSize(5),
                                          SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_get_charisma_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_get_treatment_boundary_lowered_by_regenerated_amount(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      $health->addWound($this->createWoundSize(3), SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(), $woundBoundary);
                                      $health->addWound($this->createWoundSize(6), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_heal_fresh_ordinary_wounds_if_roll_on_malus_expected(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\NeedsToRollAgainstMalusFromWoundsFirst::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      try {
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_be_ordinary_wounded(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $ordinaryWound = $health->addWound(
                                          $this->createWoundSize(2),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_be_ordinary_healed(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(7));
                              
                                      $health->addWound($this->createWoundSize(1),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_get_will_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_do_not_have_lowered_treatment_boundary_by_healed_ordinary_wound(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      $health->addWound($this->createWoundSize(3), SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(), $woundBoundary);
                                      $health->addWound($this->createWoundSize(6), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_roll_on_malus_from_wounds_if_not_needed(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\UselessRollAgainstMalus::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      $health->rollAgainstMalusFromWounds($this->createWill(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_heal_serious_wound_if_roll_on_malus_expected(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\NeedsToRollAgainstMalusFromWoundsFirst::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      try {
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function Malus_is_not_increased_on_new_heal_by_worse_roll(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      self::assertSame(0, $health->getSignificantMalusFromPains($woundBoundary));
                              
                              
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_should_roll_against_malus_from_wounds_because_of_heal_of_ordinary_wound($willValue, $rollValue, $expectedMalus): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      $health->addWound($this->createWoundSize(4),
                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_get_all_pains_and_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_add_new_wound_if_roll_on_malus_expected(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\NeedsToRollAgainstMalusFromWoundsFirst::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      try {
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_get_malus_from_wounds_if_roll_on_it_expected(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\NeedsToRollAgainstMalusFromWoundsFirst::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      try {
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_get_treatment_boundary_increased_by_serious_wound_immediately(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      self::assertSame(0, $health->getTreatmentBoundary()->getValue());
                                      $health->addWound($this->createWoundSize(7), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_ask_it_if_may_suffer_from_wounds(): void
                                  {
                                      $woundBoundary = $this->createWoundBoundary(5);
                                      $health = $this->createHealthToTest($woundBoundary);
                                      self::assertFalse($health->maySufferFromWounds($woundBoundary));
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_add_affliction_of_unknown_wound(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\UnknownAfflictionOriginatingWound::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $affliction = $this->createAffliction($this->createSeriousWound());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_add_affliction_with_to_health_unknown_wound(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\UnknownAfflictionOriginatingWound::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $seriousWound = $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_should_roll_against_malus_from_wounds_because_of_heal_of_serious_wound($willValue, $rollValue, $expectedMalus): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      $seriousWound = $health->addWound($this->createWoundSize(15),
                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function Malus_can_not_decrease_on_fresh_wound(int $willValue, int $rollValue, int $expectedMalus): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                              
                                      $health->addWound($this->createWoundSize(5),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_get_highest_malus_from_wound_and_pains(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(12));
                                      $damnSeriousWound = $health->addWound($this->createWoundSize(15),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_get_knack_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_use_it(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      self::assertSame(369, $health->getRemainingHealthAmount($woundBoundary));
                                      self::assertSame(369, $health->getHealthMaximum($woundBoundary));
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_should_roll_against_malus_from_wounds_because_of_regeneration($willValue, $rollValue, $expectedMalus): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      $health->addWound($this->createWoundSize(15),
                                          SeriousWoundOriginCode::getElementalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_regenerate_if_roll_on_malus_expected(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\NeedsToRollAgainstMalusFromWoundsFirst::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      try {
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_get_intelligence_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_easily_find_out_if_creature_is_conscious_and_alive(
                                      int $woundBoundaryValue,
                                      int $wound,
                                      bool $isConscious,
                                      bool $isAlive
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_should_roll_against_malus_from_wounds_because_of_new_wound($willValue, $rollValue, $expectedMalus): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(10));
                                      $health->addWound($this->createWoundSize(10), SeriousWoundOriginCode::getElementalWoundOrigin(), $woundBoundary);
                                      self::assertTrue($health->needsToRollAgainstMalusFromWounds());
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_add_same_affliction_twice(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\AfflictionIsAlreadyRegistered::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $wound = $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_get_strength_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_get_agility_malus_from_afflictions(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(123));
                                      $seriousWound = $health->addWound($this->createWoundSize(70),
                                          SeriousWoundOriginCode::getPsychicalWoundOrigin(),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function Malus_can_increase_on_fresh_wound(int $willValue, int $rollValue, int $expectedMalus): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                              
                                      $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_heal_serious_wound_from_different_health(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\UnknownSeriousWoundToHeal::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $seriousWound = $health->addWound($this->createWoundSize(5),
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_be_seriously_wounded(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(6));
                              
                                      $seriousWoundByStab = $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_get_healed_serious_wounds(): void
                                  {
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(6));
                              
                                      $seriousWoundByStab = $health->addWound(
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_not_heal_serious_wound_not_created_by_current_health(): void
                                  {
                                      $this->expectException(\DrdPlus\Health\Exceptions\UnknownSeriousWoundToHeal::class);
                                      $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
                                      $healthReflection = new \ReflectionClass($health);
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

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

                                  public function I_can_ask_it_if_I_am_suffering_from_wounds(): void
                                  {
                                      $woundBoundary = $this->createWoundBoundary(5);
                                      $health = $this->createHealthToTest($woundBoundary);
                                      self::assertFalse($health->mayHaveMalusFromWounds($woundBoundary));
                              Severity: Minor
                              Found in tests/Health/HealthTest.php by phpmd

                              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