Passed
Push — master ( 4271e8...d7b53e )
by Jakub
02:40
created
src/CombatAction.php 1 patch
Spacing   +4 added lines, -4 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,8 +46,8 @@  discard block
 block discarded – undo
46 46
   protected $message;
47 47
   
48 48
   public function __construct(ITranslator $translator, array $action) {
49
-    $requiredStats = ["action", "result", "character1", "character2",];
50
-    $allStats = array_merge($requiredStats, ["amount", "name",]);
49
+    $requiredStats = ["action", "result", "character1", "character2", ];
50
+    $allStats = array_merge($requiredStats, ["amount", "name", ]);
51 51
     $resolver = new OptionsResolver();
52 52
     $resolver->setDefined($allStats);
53 53
     $resolver->setRequired($requiredStats);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $text = $this->translator->translate("combat.log.poison", $this->amount, ["character1" => $character1]);
152 152
         break;
153 153
     }
154
-    $this->message =  $text;
154
+    $this->message = $text;
155 155
   }
156 156
   
157 157
   public function __toString(): string {
Please login to merge, or discard this patch.
src/SkillAttack.php 1 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
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
   
49 49
   protected function configureOptions(OptionsResolver $resolver): void {
50 50
     parent::configureOptions($resolver);
51
-    $allStats = ["baseDamage", "damageGrowth", "strikes", "hitRate",];
51
+    $allStats = ["baseDamage", "damageGrowth", "strikes", "hitRate", ];
52 52
     $resolver->setRequired($allStats);
53 53
     $resolver->setAllowedTypes("baseDamage", "string");
54 54
     $resolver->setAllowedTypes("damageGrowth", "string");
Please login to merge, or discard this patch.
src/BaseSkill.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/SkillSpecial.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
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
   public const STAT_DODGE = "dodge";
33 33
   public const STAT_INITIATIVE = "initiative";
34 34
   /** @var string[] */
35
-  public const NO_STAT_TYPES = [self::TYPE_STUN, self::TYPE_POISON,];
35
+  public const NO_STAT_TYPES = [self::TYPE_STUN, self::TYPE_POISON, ];
36 36
   
37 37
   /** @var string */
38 38
   protected $type;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
   
67 67
   protected function configureOptions(OptionsResolver $resolver): void {
68 68
     parent::configureOptions($resolver);
69
-    $allStats = ["type", "stat", "value", "valueGrowth", "duration",];
69
+    $allStats = ["type", "stat", "value", "valueGrowth", "duration", ];
70 70
     $resolver->setRequired($allStats);
71 71
     $resolver->setAllowedTypes("type", "string");
72 72
     $resolver->setAllowedValues("type", function(string $value) {
Please login to merge, or discard this patch.
src/Pet.php 1 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
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
   protected $bonusValue;
36 36
   
37 37
   public function __construct(array $data) {
38
-    $allStats = ["id", "deployed", "bonusStat", "bonusValue",];
38
+    $allStats = ["id", "deployed", "bonusStat", "bonusValue", ];
39 39
     $resolver = new OptionsResolver();
40 40
     $resolver->setDefined($allStats);
41 41
     $resolver->setRequired($allStats);
Please login to merge, or discard this patch.
src/Equipment.php 1 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
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
   protected $worn;
50 50
   
51 51
   public function __construct(array $data) {
52
-    $allStats = ["id", "name", "slot", "type", "strength", "worn",];
52
+    $allStats = ["id", "name", "slot", "type", "strength", "worn", ];
53 53
     $resolver = new OptionsResolver();
54 54
     $resolver->setDefined($allStats);
55 55
     $resolver->setRequired($allStats);
Please login to merge, or discard this patch.
src/CombatBase.php 1 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
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     $this->onCombatEnd[] = [$this, "removeCombatEffects"];
79 79
     $this->onCombatEnd[] = [$this, "logCombatResult"];
80 80
     $this->onCombatEnd[] = [$this, "resetInitiative"];
81
-    $this->onRoundStart[] = [$this ,"recalculateStats"];
81
+    $this->onRoundStart[] = [$this, "recalculateStats"];
82 82
     $this->onRoundStart[] = [$this, "logRoundNumber"];
83 83
     $this->onRoundStart[] = [$this, "applyPoison"];
84 84
     $this->onRound[] = [$this, "mainStage"];
Please login to merge, or discard this patch.
src/Character.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
   }
157 157
   
158 158
   protected function setStats(array $stats): void {
159
-    $requiredStats = ["id", "name", "level", "strength", "dexterity", "constitution", "intelligence", "charisma", "initiativeFormula",];
160
-    $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", "experience",]);
161
-    $numberStats = ["strength", "dexterity", "constitution", "intelligence", "charisma",];
162
-    $textStats = ["name", "race", "occupation", "initiativeFormula",];
159
+    $requiredStats = ["id", "name", "level", "strength", "dexterity", "constitution", "intelligence", "charisma", "initiativeFormula", ];
160
+    $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", "experience", ]);
161
+    $numberStats = ["strength", "dexterity", "constitution", "intelligence", "charisma", ];
162
+    $textStats = ["name", "race", "occupation", "initiativeFormula", ];
163 163
     $resolver = new OptionsResolver();
164 164
     $resolver->setDefined($allStats);
165 165
     $resolver->setAllowedTypes("id", ["integer", "string"]);
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
   public function equipItem(int $itemId): void {
402 402
     try {
403 403
       $item = $this->getItem($itemId);
404
-    } catch (\OutOfBoundsException $e) {
404
+    } catch(\OutOfBoundsException $e) {
405 405
       throw $e;
406 406
     }
407 407
     $itemBonus = new CharacterEffect($item->deployParams);
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
   public function unequipItem(int $itemId): void {
417 417
     try {
418 418
       $item = $this->getItem($itemId);
419
-    } catch (\OutOfBoundsException $e) {
419
+    } catch(\OutOfBoundsException $e) {
420 420
       throw $e;
421 421
     }
422 422
     $itemBonus = $item->deployParams;
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 require __DIR__ . "/../vendor/autoload.php";
5
-Testbench\Bootstrap::setup(__DIR__ . '/_temp', function (\Nette\Configurator $configurator) {
6
-  $configurator->addParameters(["appDir" => __DIR__,]);
5
+Testbench\Bootstrap::setup(__DIR__ . '/_temp', function(\Nette\Configurator $configurator) {
6
+  $configurator->addParameters(["appDir" => __DIR__, ]);
7 7
   $configurator->addConfig(__DIR__ . "/tests.neon");
8 8
 });
9 9
 ?>
10 10
\ No newline at end of file
Please login to merge, or discard this patch.