Passed
Push — master ( 7a48d2...d0f71f )
by Jakub
12:49
created
tests/HeroesofAbenez/Combat/RandomSuccessCalculatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             "id" => "stunEffect", "type" => SkillSpecial::TYPE_STUN, "valueAbsolute" => false,
46 46
             "duration" => CharacterEffect::DURATION_COMBAT,
47 47
         ]);
48
-        for ($i = 1; $i <= 10; $i++) {
48
+        for($i = 1; $i <= 10; $i++) {
49 49
             Assert::true($this->calculator->hasHit($character1, $character2));
50 50
             Assert::true($this->calculator->hasHit($character1, $character2, $characterSkill));
51 51
         }
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Combat/InitiativeFormulaParserTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     {
27 27
         $character = $this->generateCharacter(1);
28 28
         $parser = new InitiativeFormulaParser();
29
-        for ($i = 1; $i <= 10; $i++) {
29
+        for($i = 1; $i <= 10; $i++) {
30 30
             $initiative = $parser->calculateInitiative($character);
31 31
             Assert::true($initiative >= 4);
32 32
             Assert::true($initiative <= 8);
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Combat/TeamTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@
 block discarded – undo
84 84
         $team->setCharacterPosition(1, 1, 1);
85 85
         Assert::same(1, $team[0]->positionRow);
86 86
         Assert::same(1, $team[0]->positionColumn);
87
-        Assert::exception(function () use ($team) {
87
+        Assert::exception(function() use ($team) {
88 88
             $team->setCharacterPosition(2, 1, 1);
89 89
         }, \OutOfBoundsException::class);
90 90
         $team[] = $this->generateCharacter(2);
91
-        Assert::exception(function () use ($team) {
91
+        Assert::exception(function() use ($team) {
92 92
             $team->setCharacterPosition(2, 1, 1);
93 93
         }, InvalidCharacterPositionException::class, null, InvalidCharacterPositionException::POSITION_OCCUPIED);
94
-        Assert::exception(function () use ($team) {
94
+        Assert::exception(function() use ($team) {
95 95
             $team->maxRowSize = 1;
96 96
             $team->setCharacterPosition(2, 1, 2);
97 97
         }, InvalidCharacterPositionException::class, null, InvalidCharacterPositionException::ROW_FULL);
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Combat/CombatBaseTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
     public function testInvalidStates(): void
55 55
     {
56 56
         $combat = new CombatBase(clone $this->logger);
57
-        Assert::exception(function () use ($combat) {
57
+        Assert::exception(function() use ($combat) {
58 58
             $combat->execute();
59 59
         }, InvalidStateException::class);
60 60
         $combat->setTeams(new Team(""), new Team(""));
61
-        Assert::exception(function () use ($combat) {
61
+        Assert::exception(function() use ($combat) {
62 62
             $combat->setTeams(new Team(""), new Team(""));
63 63
         }, ImmutableException::class);
64 64
     }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     public function testPostCombat(): void
187 187
     {
188 188
         $combat = new CombatBase(clone $this->logger);
189
-        $combat->healers = function (Team $team1, Team $team2): Team {
189
+        $combat->healers = function(Team $team1, Team $team2): Team {
190 190
             return Team::fromArray(array_merge($team1->toArray(), $team2->toArray()), "healers");
191 191
         };
192 192
         $character1 = $this->generateCharacter(1);
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Combat/CombatActions/HealTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $character2 = $this->generateCharacter(2);
44 44
         $combat = new CombatBase(clone $this->logger, new StaticSuccessCalculator());
45 45
         $combat->setDuelParticipants($character1, $character2);
46
-        $combat->healers = function (Team $team1, Team $team2) {
46
+        $combat->healers = function(Team $team1, Team $team2) {
47 47
             return Team::fromArray($team1->toArray(), "healers");
48 48
         };
49 49
         $action = new Heal();
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $character2 = $this->generateCharacter(2);
61 61
         $combat = new CombatBase(clone $this->logger, new StaticSuccessCalculator());
62 62
         $combat->setDuelParticipants($character1, $character2);
63
-        $combat->healers = function (Team $team1, Team $team2) {
63
+        $combat->healers = function(Team $team1, Team $team2) {
64 64
             return Team::fromArray($team1->toArray(), "healers");
65 65
         };
66 66
         $combat->onCombatStart($combat);
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Combat/CombatActions/SkillAttackTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         $combat->setDuelParticipants($character1, $character2);
66 66
         $combat->onCombatStart($combat);
67 67
         $combat->onRoundStart($combat);
68
-        for ($i = 1; $i <= $character1->skills[0]->skill->cooldown; $i++) {
68
+        for($i = 1; $i <= $character1->skills[0]->skill->cooldown; $i++) {
69 69
             $character1->skills[0]->decreaseCooldown();
70 70
         }
71 71
         $action = new SkillAttack();
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Combat/CombatActions/SkillSpecialTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         $combat->setDuelParticipants($character1, $character2);
66 66
         $combat->onCombatStart($combat);
67 67
         $combat->onRoundStart($combat);
68
-        for ($i = 1; $i <= $character1->skills[0]->skill->cooldown; $i++) {
68
+        for($i = 1; $i <= $character1->skills[0]->skill->cooldown; $i++) {
69 69
             $character1->skills[0]->decreaseCooldown();
70 70
         }
71 71
         $action = new SkillSpecial();
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Combat/StaticSuccessCalculatorTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $character1 = $this->generateCharacter(1);
35 35
         $character2 = $this->generateCharacter(2);
36
-        for ($i = 1; $i <= 10; $i++) {
36
+        for($i = 1; $i <= 10; $i++) {
37 37
             Assert::true($this->calculator->hasHit($character1, $character2));
38 38
         }
39 39
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function testHasHealed(): void
42 42
     {
43 43
         $character1 = $this->generateCharacter(1);
44
-        for ($i = 1; $i <= 10; $i++) {
44
+        for($i = 1; $i <= 10; $i++) {
45 45
             Assert::true($this->calculator->hasHealed($character1));
46 46
         }
47 47
     }
Please login to merge, or discard this patch.
tests/HeroesofAbenez/Combat/WeaponTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@
 block discarded – undo
18 18
         $weaponStats = [
19 19
             "id" => 1, "name" => "Weapon", "slot" => Equipment::SLOT_WEAPON, "strength" => 1, "worn" => true,
20 20
         ];
21
-        foreach (Weapon::MELEE_TYPES as $meleeWeapon) {
21
+        foreach(Weapon::MELEE_TYPES as $meleeWeapon) {
22 22
             $weaponStats["type"] = $meleeWeapon;
23 23
             $weapon = new Weapon($weaponStats);
24 24
             Assert::false($weapon->ranged);
25 25
         }
26
-        foreach (Weapon::RANGED_TYPES as $rangedWeapon) {
26
+        foreach(Weapon::RANGED_TYPES as $rangedWeapon) {
27 27
             $weaponStats["type"] = $rangedWeapon;
28 28
             $weapon = new Weapon($weaponStats);
29 29
             Assert::true($weapon->ranged);
Please login to merge, or discard this patch.