Completed
Push — master ( a5d74c...946f06 )
by Jakub
06:04
created
src/CombatBase.php 1 patch
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
       foreach($team as $character) {
238 238
         try {
239 239
           $column++;
240
-          if($character->positionRow > 0 AND $character->positionColumn > 0) {
240
+          if($character->positionRow > 0 and $character->positionColumn > 0) {
241 241
             continue;
242 242
           }
243 243
           setPosition:
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     $characters = array_merge($combat->team1->toArray(), $combat->team2->toArray());
291 291
     foreach($characters as $character) {
292 292
       foreach($character->effects as $effect) {
293
-        if($effect->duration === CharacterEffect::DURATION_COMBAT OR is_int($effect->duration)) {
293
+        if($effect->duration === CharacterEffect::DURATION_COMBAT or is_int($effect->duration)) {
294 294
           $character->removeEffect($effect->id);
295 295
         }
296 296
       }
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
         $targets = $this->getTeam($primaryTarget)->getItems(["positionColumn" => $primaryTarget->positionColumn]);
399 399
         break;
400 400
       default:
401
-        throw new NotImplementedException("Target $skill->skill->target for attack skills is not implemented.");
401
+        throw new NotImplementedException("target $skill->skill->target for attack skills is not implemented.");
402 402
     }
403 403
     foreach($targets as $target) {
404 404
       for($i = 1; $i <= $skill->skill->strikes; $i++) {
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         $targets = $this->getEnemyTeam($character)->toArray();
424 424
         break;
425 425
       default:
426
-        throw new NotImplementedException("Target $skill->skill->target for special skills is not implemented.");
426
+        throw new NotImplementedException("target $skill->skill->target for special skills is not implemented.");
427 427
     }
428 428
     foreach($targets as $target) {
429 429
       $this->onSkillSpecial($character, $target, $skill);
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
       "character1" => $character1, "character2" => $target,
589 589
     ];
590 590
     $effect = new CharacterEffect([
591
-      "id" => "skill{$skill->skill->id}Effect",
591
+      "id" => "skill{$skill->skill->id}effect",
592 592
       "type" => $skill->skill->type,
593 593
       "stat" => ((in_array($skill->skill->type, SkillSpecial::NO_STAT_TYPES, true)) ? NULL : $skill->skill->stat),
594 594
       "value" => $skill->value,
Please login to merge, or discard this patch.
src/CombatActionSelector.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
   public function chooseAction(CombatBase $combat, Character $character): ?string {
22 22
     if($character->hitpoints < 1) {
23 23
       return NULL;
24
-    } elseif(in_array($character, $combat->findHealers()->toArray(), true) AND !is_null($combat->selectHealingTarget($character))) {
24
+    } elseif(in_array($character, $combat->findHealers()->toArray(), true) and !is_null($combat->selectHealingTarget($character))) {
25 25
       return CombatAction::ACTION_HEALING;
26 26
     }
27 27
     $attackTarget = $combat->selectAttackTarget($character);
Please login to merge, or discard this patch.