Completed
Push — master ( 10c9e5...cb21fe )
by Jakub
02:04
created
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/SkillSpecial.php 2 patches
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.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     });
75 75
     $resolver->setAllowedTypes("stat", ["string", "null"]);
76 76
     $resolver->setAllowedValues("stat", function(?string $value) {
77
-      return is_null($value) OR in_array($value, $this->getAllowedStats(), true);
77
+      return is_null($value) or in_array($value, $this->getAllowedStats(), true);
78 78
     });
79 79
     $resolver->setAllowedTypes("value", "integer");
80 80
     $resolver->setAllowedValues("value", function(int $value) {
Please login to merge, or discard this patch.
src/Equipment.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     });
62 62
     $resolver->setAllowedTypes("type", ["string", "null"]);
63 63
     $resolver->setAllowedValues("type", function(?string $value) {
64
-      return is_null($value) OR in_array($value, $this->getAllowedTypes(), true);
64
+      return is_null($value) or in_array($value, $this->getAllowedTypes(), true);
65 65
     });
66 66
     $resolver->setAllowedTypes("strength", "integer");
67 67
     $resolver->setAllowedValues("strength", function(int $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
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
   protected $worn;
51 51
   
52 52
   public function __construct(array $data) {
53
-    $allStats = ["id", "name", "slot", "type", "strength", "worn",];
53
+    $allStats = ["id", "name", "slot", "type", "strength", "worn", ];
54 54
     $resolver = new OptionsResolver();
55 55
     $resolver->setRequired($allStats);
56 56
     $resolver->setAllowedTypes("id", "integer");
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.
src/InvalidStateException.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/CombatLogger.php 2 patches
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.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
    */
76 76
   public function setTemplate(string $template): void {
77 77
     if(!is_file($template)) {
78
-      throw new \RuntimeException("File $template does not exist.");
78
+      throw new \RuntimeException("file $template does not exist.");
79 79
     }
80 80
     $this->template = $template;
81 81
   }
Please login to merge, or discard this patch.
src/BaseCharacterSkill.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/CharacterAttackSkill.php 2 patches
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.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
   }
39 39
   
40 40
   public function getHitRate(): int {
41
-    if(is_string($this->skill->hitRate) AND substr($this->skill->hitRate, -1) === "%") {
41
+    if(is_string($this->skill->hitRate) and substr($this->skill->hitRate, -1) === "%") {
42 42
       return (int) $this->skill->hitRate;
43 43
     }
44 44
     return 100;
Please login to merge, or discard this patch.
src/ImmutableException.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.