@@ -72,7 +72,6 @@ public function __construct($value)
7272 /** @psalm-suppress ImplicitToStringCast assertValidValueReturningKey returns always a string but psalm has currently an issue here */
7373 $ this ->key = static ::assertValidValueReturningKey ($ value );
7474
75- /** @psalm-var T */
7675 $ this ->value = $ value ;
7776 }
7877
@@ -126,7 +125,6 @@ public function getKey()
126125
127126 /**
128127 * @psalm-pure
129- * @psalm-suppress InvalidCast
130128 * @return string
131129 */
132130 public function __toString ()
@@ -176,6 +174,7 @@ public static function values()
176174
177175 /** @psalm-var T $value */
178176 foreach (static ::toArray () as $ key => $ value ) {
177+ /** @psalm-suppress UnsafeGenericInstantiation */
179178 $ values [$ key ] = new static ($ value );
180179 }
181180
@@ -186,7 +185,6 @@ public static function values()
186185 * Returns all possible values as an array
187186 *
188187 * @psalm-pure
189- * @psalm-suppress ImpureStaticProperty
190188 *
191189 * @psalm-return array<string, mixed>
192190 * @return array Constant name in key, constant value in value
@@ -297,6 +295,7 @@ public static function __callStatic($name, $arguments)
297295 $ message = "No static method or enum constant ' $ name' in class " . static ::class;
298296 throw new \BadMethodCallException ($ message );
299297 }
298+ /** @psalm-suppress UnsafeGenericInstantiation */
300299 return self ::$ instances [$ class ][$ name ] = new static ($ array [$ name ]);
301300 }
302301 return clone self ::$ instances [$ class ][$ name ];
@@ -309,6 +308,7 @@ public static function __callStatic($name, $arguments)
309308 * @return mixed
310309 * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
311310 * @psalm-pure
311+ * @psalm-suppress UndefinedAttributeClass ReturnTypeWillChange is not available on <PHP8
312312 */
313313 #[\ReturnTypeWillChange]
314314 public function jsonSerialize ()
0 commit comments