Passed
Push — master ( 0d8198...7c8b7e )
by Jakub
03:48
created
src/CharacterEffect.php 1 patch
Spacing   +3 added lines, -3 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
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
   public $onRemove = [];
47 47
   
48 48
   public function __construct(array $effect) {
49
-    $allStats = ["id", "type", "source", "value", "duration", "stat",];
49
+    $allStats = ["id", "type", "source", "value", "duration", "stat", ];
50 50
     $resolver = new OptionsResolver();
51 51
     $resolver->setRequired($allStats);
52 52
     $resolver->setAllowedTypes("id", "string");
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
   
86 86
   protected function getAllowedStats(): array {
87 87
     $stats = Constants::getConstantsValues(SkillSpecial::class, "STAT_");
88
-    $stats = array_merge($stats, ["strength", "dexterity", "constitution", "intelligence", "charisma",]);
88
+    $stats = array_merge($stats, ["strength", "dexterity", "constitution", "intelligence", "charisma", ]);
89 89
     return $stats;
90 90
   }
91 91
   
Please login to merge, or discard this patch.
src/CombatBase.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     $characters = array_merge($combat->team1->items, $combat->team2->items);
299 299
     foreach($characters as $character) {
300 300
       foreach($character->effects as $effect) {
301
-        if($effect->duration === CharacterEffect::DURATION_COMBAT OR is_int($effect->duration)) {
301
+        if($effect->duration === CharacterEffect::DURATION_COMBAT or is_int($effect->duration)) {
302 302
           $character->removeEffect($effect->id);
303 303
         }
304 304
       }
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
       $threshold = static::LOWEST_HP_THRESHOLD;
390 390
     }
391 391
     foreach($team->aliveMembers as $index => $member) {
392
-      if($member->hitpoints <= $member->maxHitpoints * $threshold AND $member->hitpoints < $lowestHp) {
392
+      if($member->hitpoints <= $member->maxHitpoints * $threshold and $member->hitpoints < $lowestHp) {
393 393
         $lowestHp = $member->hitpoints;
394 394
         $lowestIndex = $index;
395 395
       }
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
   protected function chooseAction(CombatBase $combat, Character $character): ?string {
442 442
     if($character->hitpoints < 1) {
443 443
       return NULL;
444
-    } elseif(in_array($character, $combat->findHealers()->items, true) AND !is_null($combat->selectHealingTarget($character))) {
444
+    } elseif(in_array($character, $combat->findHealers()->items, true) and !is_null($combat->selectHealingTarget($character))) {
445 445
       return CombatAction::ACTION_HEALING;
446 446
     }
447 447
     $attackTarget = $combat->selectAttackTarget($character);
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
     ];
629 629
     $this->results = $result;
630 630
     $effect = new CharacterEffect([
631
-      "id" => "skill{$skill->skill->id}Effect",
631
+      "id" => "skill{$skill->skill->id}effect",
632 632
       "type" => $skill->skill->type,
633 633
       "stat" => ((in_array($skill->skill->type, SkillSpecial::NO_STAT_TYPES, true)) ? NULL : $skill->skill->stat),
634 634
       "value" => $skill->value,
Please login to merge, or discard this patch.