Completed
Push — master ( 25ba12...d7e08b )
by Jakub
02:28
created
src/CharacterEffect.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     $resolver->setAllowedTypes("stat", "string");
53 53
     $resolver->setDefault("stat", "");
54 54
     $resolver->setAllowedValues("stat", function(string $value) {
55
-      return $value === "" OR in_array($value, $this->getAllowedStats(), true);
55
+      return $value === "" or in_array($value, $this->getAllowedStats(), true);
56 56
     });
57 57
     $resolver->setAllowedTypes("source", "string");
58 58
     $resolver->setAllowedValues("source", function(string $value) {
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
     $resolver->setDefault("value", 0);
63 63
     $resolver->setAllowedTypes("duration", ["string", "integer"]);
64 64
     $resolver->setAllowedValues("duration", function($value) {
65
-      return (in_array($value, $this->getDurations(), true)) OR ($value > 0);
65
+      return (in_array($value, $this->getDurations(), true)) or ($value > 0);
66 66
     });
67 67
     $effect = $resolver->resolve($effect);
68
-    if(!in_array($effect["type"], SkillSpecial::NO_STAT_TYPES, true) AND $effect["stat"] === "") {
68
+    if(!in_array($effect["type"], SkillSpecial::NO_STAT_TYPES, true) and $effect["stat"] === "") {
69 69
       throw new \InvalidArgumentException("The option stat with value '' is invalid.");
70 70
     }
71 71
     $this->id = $effect["id"];
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
    * @throws \InvalidArgumentException
136 136
    */
137 137
   public function setDuration($value) {
138
-    if(!is_int($value) AND !in_array($value, $this->getDurations(), true)) {
138
+    if(!is_int($value) and !in_array($value, $this->getDurations(), true)) {
139 139
       throw new \InvalidArgumentException("Invalid value set to CharacterEffect::\$duration. Expected string or integer.");
140 140
     }
141 141
     $this->duration = $value;
Please login to merge, or discard this patch.