Completed
Push — master ( 5eb6e2...5eaa75 )
by Jakub
05:29
created
src/CharacterEffect.php 1 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.