Completed
Pull Request — master (#7)
by Pavel
04:24
created
src/Enum.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     final public function __construct($value = null, bool $deprecate = true)
27 27
     {
28 28
         if ($deprecate) {
29
-            trigger_error(__METHOD__ . ' is deprecated and will be private in 2.0. Use static constructors or createByName.', E_USER_DEPRECATED);
29
+            trigger_error(__METHOD__.' is deprecated and will be private in 2.0. Use static constructors or createByName.', E_USER_DEPRECATED);
30 30
         }
31 31
 
32 32
         if ($value === null) {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         return array_filter(
59 59
             self::$reflections[static::class]->getConstants(),
60
-            function ($key) use ($includeDefault) {
60
+            function($key) use ($includeDefault) {
61 61
                 return !($includeDefault === false && $key === self::$defaultConstantName);
62 62
             },
63 63
             ARRAY_FILTER_USE_KEY
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     final public function getValue()
140 140
     {
141
-        trigger_error(__METHOD__ . ' is deprecated and will be removed in 2.0. Cast to string instead.', E_USER_DEPRECATED);
141
+        trigger_error(__METHOD__.' is deprecated and will be removed in 2.0. Cast to string instead.', E_USER_DEPRECATED);
142 142
 
143 143
         return $this->value;
144 144
     }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     final public function equals(Enum $enum): bool
156 156
     {
157
-        trigger_error(__METHOD__ . ' is deprecated and will be removed in 2.0. Use weak comparison instead.', E_USER_DEPRECATED);
157
+        trigger_error(__METHOD__.' is deprecated and will be removed in 2.0. Use weak comparison instead.', E_USER_DEPRECATED);
158 158
 
159 159
         return (string) $this === (string) $enum && static::class === \get_class($enum);
160 160
     }
Please login to merge, or discard this patch.
src/EnumValueToIntegerTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function toInt(): int
21 21
     {
22
-        trigger_error(__METHOD__ . ' is deprecated and will be removed in 2.0. Use string-named enums.', E_USER_DEPRECATED);
22
+        trigger_error(__METHOD__.' is deprecated and will be removed in 2.0. Use string-named enums.', E_USER_DEPRECATED);
23 23
 
24 24
         if (!is_integer($this->getValue())) {
25 25
             throw EnumException::becauseValueNotInteger();
Please login to merge, or discard this patch.