Completed
Pull Request — master (#39)
by Cédric
01:48
created
src/Enum.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function serialize(): string
154 154
     {
155
-        if(!is_string($this->getValue()) && !is_int($this->getValue())) {
155
+        if (!is_string($this->getValue()) && !is_int($this->getValue())) {
156 156
             throw new NotSerializableException('Only values of type "string" or "int" can be serialized');
157 157
         }
158 158
 
159
-        return (string)$this->getValue();
159
+        return (string) $this->getValue();
160 160
     }
161 161
 
162 162
     /**
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function unserialize($serialized)
166 166
     {
167
-        if(static::accepts($serialized)) {
167
+        if (static::accepts($serialized)) {
168 168
             $this->value = $serialized;
169 169
             return;
170 170
         }
171
-        if(is_numeric($serialized) && static::accepts(intval($serialized))) {
171
+        if (is_numeric($serialized) && static::accepts(intval($serialized))) {
172 172
             $this->value = intval($serialized);
173 173
             return;
174 174
         }
Please login to merge, or discard this patch.