@@ -72,7 +72,6 @@ public function __construct($value)
72
72
/** @psalm-suppress ImplicitToStringCast assertValidValueReturningKey returns always a string but psalm has currently an issue here */
73
73
$ this ->key = static ::assertValidValueReturningKey ($ value );
74
74
75
- /** @psalm-var T */
76
75
$ this ->value = $ value ;
77
76
}
78
77
@@ -126,7 +125,6 @@ public function getKey()
126
125
127
126
/**
128
127
* @psalm-pure
129
- * @psalm-suppress InvalidCast
130
128
* @return string
131
129
*/
132
130
public function __toString ()
@@ -176,6 +174,7 @@ public static function values()
176
174
177
175
/** @psalm-var T $value */
178
176
foreach (static ::toArray () as $ key => $ value ) {
177
+ /** @psalm-suppress UnsafeGenericInstantiation */
179
178
$ values [$ key ] = new static ($ value );
180
179
}
181
180
@@ -186,7 +185,6 @@ public static function values()
186
185
* Returns all possible values as an array
187
186
*
188
187
* @psalm-pure
189
- * @psalm-suppress ImpureStaticProperty
190
188
*
191
189
* @psalm-return array<string, mixed>
192
190
* @return array Constant name in key, constant value in value
@@ -297,6 +295,7 @@ public static function __callStatic($name, $arguments)
297
295
$ message = "No static method or enum constant ' $ name' in class " . static ::class;
298
296
throw new \BadMethodCallException ($ message );
299
297
}
298
+ /** @psalm-suppress UnsafeGenericInstantiation */
300
299
return self ::$ instances [$ class ][$ name ] = new static ($ array [$ name ]);
301
300
}
302
301
return clone self ::$ instances [$ class ][$ name ];
@@ -309,6 +308,7 @@ public static function __callStatic($name, $arguments)
309
308
* @return mixed
310
309
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
311
310
* @psalm-pure
311
+ * @psalm-suppress UndefinedAttributeClass ReturnTypeWillChange is not available on <PHP8
312
312
*/
313
313
#[\ReturnTypeWillChange]
314
314
public function jsonSerialize ()
0 commit comments