Passed
Push — master ( 8590e9...29e2cf )
by Jakub
02:01
created
src/CombatAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
   }
61 61
 
62 62
   protected function configureOptions(OptionsResolver $resolver): void {
63
-    $requiredStats = ["action", "result", "character1", "character2",];
64
-    $resolver->setDefined(["amount", "name",]);
63
+    $requiredStats = ["action", "result", "character1", "character2", ];
64
+    $resolver->setDefined(["amount", "name", ]);
65 65
     $resolver->setRequired($requiredStats);
66 66
     $resolver->setAllowedTypes("action", "string");
67 67
     $resolver->setAllowedValues("action", function(string $value) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $text = $this->translator->translate("combat.log.poison", $this->amount, ["character1" => $character1]);
155 155
         break;
156 156
     }
157
-    $this->message =  $text;
157
+    $this->message = $text;
158 158
   }
159 159
   
160 160
   public function __toString(): string {
Please login to merge, or discard this patch.
src/CharacterEffect.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
   }
74 74
 
75 75
   protected function configureOptions(OptionsResolver $resolver): void {
76
-    $allStats = ["id", "type", "source", "value", "duration", "stat",];
76
+    $allStats = ["id", "type", "source", "value", "duration", "stat", ];
77 77
     $resolver->setRequired($allStats);
78 78
     $resolver->setAllowedTypes("id", "string");
79 79
     $resolver->setAllowedTypes("type", "string");
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
   
100 100
   protected function getAllowedStats(): array {
101 101
     $stats = Constants::getConstantsValues(Character::class, "STAT_");
102
-    $stats = array_merge($stats, ["strength", "dexterity", "constitution", "intelligence", "charisma",]);
102
+    $stats = array_merge($stats, ["strength", "dexterity", "constitution", "intelligence", "charisma", ]);
103 103
     return $stats;
104 104
   }
105 105
   
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     $resolver = new OptionsResolver();
50 50
     $this->configureOptions($resolver);
51 51
     $effect = $resolver->resolve($effect);
52
-    if(!in_array($effect["type"], SkillSpecial::NO_STAT_TYPES, true) AND $effect["stat"] === "") {
52
+    if(!in_array($effect["type"], SkillSpecial::NO_STAT_TYPES, true) and $effect["stat"] === "") {
53 53
       throw new \InvalidArgumentException("The option stat with value '' is invalid.");
54 54
     }
55 55
     $this->id = $effect["id"];
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     $resolver->setAllowedTypes("stat", "string");
84 84
     $resolver->setDefault("stat", "");
85 85
     $resolver->setAllowedValues("stat", function(string $value) {
86
-      return $value === "" OR in_array($value, $this->getAllowedStats(), true);
86
+      return $value === "" or in_array($value, $this->getAllowedStats(), true);
87 87
     });
88 88
     $resolver->setAllowedTypes("source", "string");
89 89
     $resolver->setAllowedValues("source", function(string $value) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     $resolver->setDefault("value", 0);
94 94
     $resolver->setAllowedTypes("duration", ["string", "integer"]);
95 95
     $resolver->setAllowedValues("duration", function($value) {
96
-      return (in_array($value, $this->getDurations(), true)) OR ($value > 0);
96
+      return (in_array($value, $this->getDurations(), true)) or ($value > 0);
97 97
     });
98 98
   }
99 99
   
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
    * @throws \InvalidArgumentException
157 157
    */
158 158
   public function setDuration($value): void {
159
-    if(!is_int($value) AND !in_array($value, $this->getDurations(), true)) {
159
+    if(!is_int($value) and !in_array($value, $this->getDurations(), true)) {
160 160
       throw new \InvalidArgumentException("Invalid value set to CharacterEffect::\$duration. Expected string or integer.");
161 161
     }
162 162
     $this->duration = $value;
Please login to merge, or discard this patch.
src/TextCombatLogRender.php 1 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/BaseSkill.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
   protected $levels;
42 42
   
43 43
   protected function configureOptions(OptionsResolver $resolver): void {
44
-    $resolver->setRequired(["id", "name", "target", "levels",]);
44
+    $resolver->setRequired(["id", "name", "target", "levels", ]);
45 45
     $resolver->setAllowedTypes("id", "int");
46 46
     $resolver->setAllowedTypes("name", "string");
47 47
     $resolver->setAllowedTypes("target", "string");
Please login to merge, or discard this patch.