Passed
Push — master ( cdb94c...dd3471 )
by Jakub
04:07
created
src/CharacterEffect.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
   }
71 71
 
72 72
   protected function configureOptions(OptionsResolver $resolver): void {
73
-    $allStats = ["id", "type", "value", "valueAbsolute", "duration", "stat",];
73
+    $allStats = ["id", "type", "value", "valueAbsolute", "duration", "stat", ];
74 74
     $resolver->setRequired($allStats);
75 75
     $resolver->setAllowedTypes("id", "string");
76 76
     $resolver->setAllowedTypes("type", "string");
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     $resolver = new OptionsResolver();
47 47
     $this->configureOptions($resolver);
48 48
     $effect = $resolver->resolve($effect);
49
-    if(!in_array($effect["type"], SkillSpecial::NO_STAT_TYPES, true) AND $effect["stat"] === "") {
49
+    if(!in_array($effect["type"], SkillSpecial::NO_STAT_TYPES, true) and $effect["stat"] === "") {
50 50
       throw new \InvalidArgumentException("The option stat with value '' is invalid.");
51 51
     }
52 52
     $this->id = $effect["id"];
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
     $resolver->setAllowedTypes("stat", "string");
81 81
     $resolver->setDefault("stat", "");
82 82
     $resolver->setAllowedValues("stat", function(string $value) {
83
-      return $value === "" OR in_array($value, $this->getAllowedStats(), true);
83
+      return $value === "" or in_array($value, $this->getAllowedStats(), true);
84 84
     });
85 85
     $resolver->setAllowedTypes("value", "integer");
86 86
     $resolver->setAllowedTypes("valueAbsolute", "bool");
87 87
     $resolver->setDefault("value", 0);
88 88
     $resolver->setAllowedTypes("duration", ["string", "integer"]);
89 89
     $resolver->setAllowedValues("duration", function($value) {
90
-      return (in_array($value, $this->getDurations(), true)) OR ($value > 0);
90
+      return (in_array($value, $this->getDurations(), true)) or ($value > 0);
91 91
     });
92 92
   }
93 93
   
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
    * @throws \InvalidArgumentException
149 149
    */
150 150
   public function setDuration($value): void {
151
-    if(!is_int($value) AND !in_array($value, $this->getDurations(), true)) {
151
+    if(!is_int($value) and !in_array($value, $this->getDurations(), true)) {
152 152
       throw new \InvalidArgumentException("Invalid value set to CharacterEffect::\$duration. Expected string or integer.");
153 153
     }
154 154
     $this->duration = $value;
Please login to merge, or discard this patch.