Passed
Branch master (bb00ee)
by Simon
12:02
created
src/Enum.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -47,53 +47,53 @@
 block discarded – undo
47 47
     final public function __construct(string $type)
48 48
     {
49 49
         if (false === defined("static::$type") || null === constant("static::$type")) {
50
-           throw new InvalidEnumValueException;
50
+            throw new InvalidEnumValueException;
51 51
         }
52 52
 
53 53
         $this->value = constant("static::$type");
54
-     }
54
+        }
55 55
 
56
-     /**
57
-      * Call a static method to construct a new enum
58
-      *
59
-      * Attempts to convert the called method name to uppercase but if that fails
60
-      * then it resorts to using whatever case the method name was passed in.
61
-      *
62
-      * @param string $name - the name of the method to invoke
63
-      * @param array $args - an array of arguments passed to the method call
64
-      * @return self
65
-      * @throws InvalidEnumValueException - Thrown if the value passed is not an enum constant
66
-      */
67
-     final public static function __callStatic(string $method, array $args = []): self
68
-     {
69
-         try {
70
-             return new static(strtoupper($method));
71
-         } catch (InvalidEnumValueException $exception) {
72
-             return new static($method);
73
-         }
74
-     }
56
+        /**
57
+         * Call a static method to construct a new enum
58
+         *
59
+         * Attempts to convert the called method name to uppercase but if that fails
60
+         * then it resorts to using whatever case the method name was passed in.
61
+         *
62
+         * @param string $name - the name of the method to invoke
63
+         * @param array $args - an array of arguments passed to the method call
64
+         * @return self
65
+         * @throws InvalidEnumValueException - Thrown if the value passed is not an enum constant
66
+         */
67
+        final public static function __callStatic(string $method, array $args = []): self
68
+        {
69
+            try {
70
+                return new static(strtoupper($method));
71
+            } catch (InvalidEnumValueException $exception) {
72
+                return new static($method);
73
+            }
74
+        }
75 75
 
76
-     /**
77
-      * Returns the value of the ENUM
78
-      *
79
-      * @final
80
-      * @return mixed
81
-      */
82
-     final public function getValue()
83
-     {
84
-         return $this->value;
85
-     }
76
+        /**
77
+         * Returns the value of the ENUM
78
+         *
79
+         * @final
80
+         * @return mixed
81
+         */
82
+        final public function getValue()
83
+        {
84
+            return $this->value;
85
+        }
86 86
 
87
-     /**
88
-      * Returns the type of the ENUM
89
-      *
90
-      * @see simondeeley\Type\Type
91
-      * @static
92
-      *
93
-      * @return string - String literal of the enum object
94
-      */
95
-     public static function getType(): string
96
-     {
97
-         return 'ENUM';
98
-     }
87
+        /**
88
+         * Returns the type of the ENUM
89
+         *
90
+         * @see simondeeley\Type\Type
91
+         * @static
92
+         *
93
+         * @return string - String literal of the enum object
94
+         */
95
+        public static function getType(): string
96
+        {
97
+            return 'ENUM';
98
+        }
99 99
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * This file is part of the Enum package.
5 5
  * For the full copyright information please view the LICENCE file that was
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
       * @return self
65 65
       * @throws InvalidEnumValueException - Thrown if the value passed is not an enum constant
66 66
       */
67
-     final public static function __callStatic(string $method, array $args = []): self
67
+     final public static function __callStatic(string $method, array $args = [ ]): self
68 68
      {
69 69
          try {
70 70
              return new static(strtoupper($method));
Please login to merge, or discard this patch.
src/Type/EnumType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * This file is part of the Enum package.
5 5
  * For the full copyright information please view the LICENCE file that was
Please login to merge, or discard this patch.
src/Enums/Weekday.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * This file is part of the Enum package.
5 5
  * For the full copyright information please view the LICENCE file that was
Please login to merge, or discard this patch.
src/Enums/Boolean.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * This file is part of the Enum package.
5 5
  * For the full copyright information please view the LICENCE file that was
Please login to merge, or discard this patch.
src/Exceptions/InvalidEnumValueException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * This file is part of the Enum package.
5 5
  * For the full copyright information please view the LICENCE file that was
Please login to merge, or discard this patch.