Completed
Push — master ( feae1a...1a50e1 )
by Jakub
02:36
created
src/InitiativeFormulaParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Combat;
5 5
 
Please login to merge, or discard this patch.
src/ISuccessCalculator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Combat;
5 5
 
Please login to merge, or discard this patch.
src/StaticSuccessCalculator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Combat;
5 5
 
Please login to merge, or discard this patch.
src/RandomSuccessCalculator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Combat;
5 5
 
Please login to merge, or discard this patch.
src/ConstantInitiativeFormulaParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Combat;
5 5
 
Please login to merge, or discard this patch.
src/NotImplementedException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Combat;
5 5
 
Please login to merge, or discard this patch.
src/InvalidCharacterPositionException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Combat;
5 5
 
Please login to merge, or discard this patch.
src/CombatBase.php 2 patches
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
       foreach($team as $character) {
229 229
         try {
230 230
           $column++;
231
-          if($character->positionRow > 0 AND $character->positionColumn > 0) {
231
+          if($character->positionRow > 0 and $character->positionColumn > 0) {
232 232
             continue;
233 233
           }
234 234
           setPosition:
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     $characters = array_merge($combat->team1->toArray(), $combat->team2->toArray());
272 272
     foreach($characters as $character) {
273 273
       foreach($character->effects as $effect) {
274
-        if($effect->duration === CharacterEffect::DURATION_COMBAT OR is_int($effect->duration)) {
274
+        if($effect->duration === CharacterEffect::DURATION_COMBAT or is_int($effect->duration)) {
275 275
           $character->removeEffect($effect->id);
276 276
         }
277 277
       }
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
       $threshold = static::LOWEST_HP_THRESHOLD;
360 360
     }
361 361
     foreach($team->aliveMembers as $index => $member) {
362
-      if($member->hitpoints <= $member->maxHitpoints * $threshold AND $member->hitpoints < $lowestHp) {
362
+      if($member->hitpoints <= $member->maxHitpoints * $threshold and $member->hitpoints < $lowestHp) {
363 363
         $lowestHp = $member->hitpoints;
364 364
         $lowestIndex = $index;
365 365
       }
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         $targets = $this->getTeam($primaryTarget)->getMembers(["positionColumn" => $primaryTarget->positionColumn]);
403 403
         break;
404 404
       default:
405
-        throw new NotImplementedException("Target $skill->skill->target for attack skills is not implemented.");
405
+        throw new NotImplementedException("target $skill->skill->target for attack skills is not implemented.");
406 406
     }
407 407
     foreach($targets as $target) {
408 408
       for($i = 1; $i <= $skill->skill->strikes; $i++) {
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
         $targets = $this->getEnemyTeam($character)->toArray();
428 428
         break;
429 429
       default:
430
-        throw new NotImplementedException("Target $skill->skill->target for special skills is not implemented.");
430
+        throw new NotImplementedException("target $skill->skill->target for special skills is not implemented.");
431 431
     }
432 432
     foreach($targets as $target) {
433 433
       $this->onSkillSpecial($character, $target, $skill);
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
   protected function chooseAction(CombatBase $combat, Character $character): ?string {
438 438
     if($character->hitpoints < 1) {
439 439
       return NULL;
440
-    } elseif(in_array($character, $combat->findHealers()->toArray(), true) AND !is_null($combat->selectHealingTarget($character))) {
440
+    } elseif(in_array($character, $combat->findHealers()->toArray(), true) and !is_null($combat->selectHealingTarget($character))) {
441 441
       return CombatAction::ACTION_HEALING;
442 442
     }
443 443
     $attackTarget = $combat->selectAttackTarget($character);
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
       "character1" => $character1, "character2" => $target,
621 621
     ];
622 622
     $effect = new CharacterEffect([
623
-      "id" => "skill{$skill->skill->id}Effect",
623
+      "id" => "skill{$skill->skill->id}effect",
624 624
       "type" => $skill->skill->type,
625 625
       "stat" => ((in_array($skill->skill->type, SkillSpecial::NO_STAT_TYPES, true)) ? NULL : $skill->skill->stat),
626 626
       "value" => $skill->value,
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace HeroesofAbenez\Combat;
5 5
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     $this->onCombatEnd[] = [$this, "logCombatResult"];
83 83
     $this->onCombatEnd[] = [$this, "resetInitiative"];
84 84
     $this->onRoundStart[] = [$this, "decreaseEffectsDuration"];
85
-    $this->onRoundStart[] = [$this ,"recalculateStats"];
85
+    $this->onRoundStart[] = [$this, "recalculateStats"];
86 86
     $this->onRoundStart[] = [$this, "logRoundNumber"];
87 87
     $this->onRoundStart[] = [$this, "applyPoison"];
88 88
     $this->onRound[] = [$this, "mainStage"];
Please login to merge, or discard this patch.