Completed
Push — master ( 843ccd...b2206c )
by Jakub
02:38
created
src/Equipment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
   }
53 53
   
54 54
   protected function configureOptions(OptionsResolver $resolver): void {
55
-    $allStats = ["id", "name", "slot", "type", "strength", "worn",];
55
+    $allStats = ["id", "name", "slot", "type", "strength", "worn", ];
56 56
     $resolver->setRequired($allStats);
57 57
     $resolver->setAllowedTypes("id", "integer");
58 58
     $resolver->setAllowedTypes("name", "string");
Please login to merge, or discard this patch.
src/Weapon.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     parent::configureOptions($resolver);
34 34
     $resolver->setAllowedTypes("type", ["string"]);
35 35
     $resolver->setAllowedValues("type", function(?string $value) {
36
-      return is_null($value) OR in_array($value, $this->getAllowedTypes(), true);
36
+      return is_null($value) or in_array($value, $this->getAllowedTypes(), true);
37 37
     });
38 38
   }
39 39
   
Please login to merge, or discard this patch.
src/CombatBase.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -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"];
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         return null;
364 364
       }
365 365
       /** @var Team $enemies */
366
-      $enemies = Team::fromArray($enemyTeam->getItems(["positionRow" => $rowToAttack, "hitpoints>" => 0,]), $enemyTeam->name);
366
+      $enemies = Team::fromArray($enemyTeam->getItems(["positionRow" => $rowToAttack, "hitpoints>" => 0, ]), $enemyTeam->name);
367 367
     } else {
368 368
       $enemies = $enemyTeam;
369 369
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 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
       }
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     $enemyTeam = $this->getEnemyTeam($attacker);
353 353
     $rangedWeapon = false;
354 354
     foreach($attacker->equipment as $equipment) {
355
-      if($equipment instanceof Weapon AND $equipment->isWorn() AND $equipment->ranged) {
355
+      if($equipment instanceof Weapon and $equipment->isWorn() and $equipment->ranged) {
356 356
         $rangedWeapon = true;
357 357
         break;
358 358
       }
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
         $targets = $this->getTeam($primaryTarget)->getItems(["positionColumn" => $primaryTarget->positionColumn]);
410 410
         break;
411 411
       default:
412
-        throw new NotImplementedException("Target $skill->skill->target for attack skills is not implemented.");
412
+        throw new NotImplementedException("target $skill->skill->target for attack skills is not implemented.");
413 413
     }
414 414
     foreach($targets as $target) {
415 415
       for($i = 1; $i <= $skill->skill->strikes; $i++) {
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         $targets = $this->getEnemyTeam($character)->toArray();
435 435
         break;
436 436
       default:
437
-        throw new NotImplementedException("Target $skill->skill->target for special skills is not implemented.");
437
+        throw new NotImplementedException("target $skill->skill->target for special skills is not implemented.");
438 438
     }
439 439
     foreach($targets as $target) {
440 440
       $this->onSkillSpecial($character, $target, $skill);
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
       "character1" => $character1, "character2" => $target,
600 600
     ];
601 601
     $effect = new CharacterEffect([
602
-      "id" => "skill{$skill->skill->id}Effect",
602
+      "id" => "skill{$skill->skill->id}effect",
603 603
       "type" => $skill->skill->type,
604 604
       "stat" => ((in_array($skill->skill->type, SkillSpecial::NO_STAT_TYPES, true)) ? null : $skill->skill->stat),
605 605
       "value" => $skill->value,
Please login to merge, or discard this patch.