GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Branch dev-master (dfb3ad)
by Vijay
66:38 queued 31:39
created
src/Enums/Enum.php 1 patch
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         if (empty($allowed)) {
126 126
             throw new \LogicException('Method not allowed.');
127 127
         }
128
-        $values =& static::$values;
128
+        $values = & static::$values;
129 129
         if (array_key_exists($key, $values)) {
130 130
             unset($values[$key]);
131 131
         } else {
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public static function fixKeys()
144 144
     {
145
-        $values =& static::$values;
145
+        $values = & static::$values;
146 146
 
147 147
         foreach ($values as $k => $v) {
148 148
             $oldKey = $k;
149 149
             if (!is_string($k)) {
150 150
                 if (!is_string($v)) {
151
-                    throw new \UnexpectedValueException(sprintf("Key '%s' for value '%s' is not a string!", print_r($k,1), print_r($v,1)));
151
+                    throw new \UnexpectedValueException(sprintf("Key '%s' for value '%s' is not a string!", print_r($k, 1), print_r($v, 1)));
152 152
                 }
153 153
                 // if the key is not a string, use the value if it is a string
154 154
                 $k = $v;
@@ -182,12 +182,12 @@  discard block
 block discarded – undo
182 182
         if (is_string($newValues)) {
183 183
             $newValues = [$newValues => $newValues];
184 184
         }
185
-        $values =& static::$values;
185
+        $values = & static::$values;
186 186
         foreach ($newValues as $k => $v) {
187 187
             $oldKey = $k;
188 188
             if (!is_string($k)) {
189 189
                 if (!is_string($v)) {
190
-                    throw new \UnexpectedValueException(sprintf("Key '%s' for value '%s' is not a string!", print_r($k,1), print_r($v,1)));
190
+                    throw new \UnexpectedValueException(sprintf("Key '%s' for value '%s' is not a string!", print_r($k, 1), print_r($v, 1)));
191 191
                 }
192 192
                 // if the key is not a string, use the value if it is a string
193 193
                 $k = $v;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                     $caseSensitive = static::$caseSensitive;
235 235
                 }
236 236
                 if (empty($caseSensitive)) {
237
-                    $values = array_map(function($value){
237
+                    $values = array_map(function($value) {
238 238
                         return strtoupper($value);
239 239
                     }, $values);
240 240
                 }
@@ -242,13 +242,13 @@  discard block
 block discarded – undo
242 242
             $keys = array_keys($values, $value);
243 243
             $count = count($keys);
244 244
             if (0 === $count) {
245
-                throw new \InvalidArgumentException(sprintf("Key for value '%s' does not exist.", print_r($value,1)));
245
+                throw new \InvalidArgumentException(sprintf("Key for value '%s' does not exist.", print_r($value, 1)));
246 246
             }
247 247
             return count($keys) > 1 ? $keys : $keys[0];
248 248
         } elseif (is_array($value)) {
249 249
             $search = array_search($value, $values);
250 250
             if (false === $search) {
251
-                throw new \InvalidArgumentException(sprintf("Key for value '%s' does not exist.", print_r($value,1)));
251
+                throw new \InvalidArgumentException(sprintf("Key for value '%s' does not exist.", print_r($value, 1)));
252 252
             }
253 253
             return $search;
254 254
         }
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             $values = array_change_key_case($values, CASE_UPPER);
308 308
         }
309 309
         if (false === array_key_exists($key, $values)) {
310
-            throw new \InvalidArgumentException(sprintf("Value for key '%s' does not exist.", print_r($key,1)));
310
+            throw new \InvalidArgumentException(sprintf("Value for key '%s' does not exist.", print_r($key, 1)));
311 311
         }
312 312
         return $values[$key];
313 313
     }
@@ -363,8 +363,7 @@  discard block
 block discarded – undo
363 363
     public function __isset($key)
364 364
     {
365 365
         return empty(static::$caseSensitive) ?
366
-            array_key_exists(strtoupper($key), array_change_key_case(static::$values, CASE_UPPER)) :
367
-            array_key_exists($key, static::$values);
366
+            array_key_exists(strtoupper($key), array_change_key_case(static::$values, CASE_UPPER)) : array_key_exists($key, static::$values);
368 367
     }
369 368
 
370 369
 
Please login to merge, or discard this patch.