Completed
Push — master ( 158f3b...8278cb )
by Marijan
01:18
created
src/EnumNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Zlikavac32\Enum;
6 6
 
Please login to merge, or discard this patch.
src/Enum.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Zlikavac32\Enum;
6 6
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         //Expected usage is new class extends Enum so first parent should be our construction context
46 46
         if (isset(self::$enumConstructionContext[get_parent_class($this)])) {
47
-            return ;
47
+            return;
48 48
         }
49 49
 
50 50
         throw new LogicException(
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     private function assertCorrectlyInitialized(): void
59 59
     {
60 60
         if ($this->correctlyInitialized) {
61
-            return ;
61
+            return;
62 62
         }
63 63
 
64 64
         throw new LogicException(
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     private static function ensureEnumsAreDiscoveredForClass(string $class)
211 211
     {
212 212
         if (isset(self::$existingEnums[$class])) {
213
-            return ;
213
+            return;
214 214
         }
215 215
 
216 216
         try {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     private static function assertEnumClassIsAbstract(string $fqn): void
260 260
     {
261 261
         if ((new ReflectionClass($fqn))->isAbstract()) {
262
-            return ;
262
+            return;
263 263
         }
264 264
 
265 265
         throw new LogicException(sprintf('Enum %s must be declared as abstract', $fqn));
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         $pattern = '/^[a-zA-Z_][a-zA-Z_0-9]*$/i';
325 325
 
326 326
         if (preg_match($pattern, $name)) {
327
-            return ;
327
+            return;
328 328
         }
329 329
 
330 330
         throw new LogicException(sprintf('Element name "%s" does not match pattern %s', $name, $pattern));
Please login to merge, or discard this patch.