@@ -26,7 +26,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -19,7 +19,7 @@ |
||
| 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(); |