@@ -45,7 +45,7 @@ |
||
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 | } |
@@ -26,7 +26,7 @@ |
||
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); |
@@ -84,14 +84,14 @@ |
||
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); |
@@ -54,11 +54,11 @@ discard block |
||
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 |
||
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); |
@@ -43,7 +43,7 @@ discard block |
||
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 |
||
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); |
@@ -65,7 +65,7 @@ |
||
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(); |
@@ -65,7 +65,7 @@ |
||
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(); |
@@ -33,7 +33,7 @@ discard block |
||
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 |
||
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 | } |
@@ -18,12 +18,12 @@ |
||
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); |