-
-
Notifications
You must be signed in to change notification settings - Fork 132
Bump psalm to v4.9.2 #151
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Bump psalm to v4.9.2 #151
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,6 @@ public function __construct($value) | |
/** @psalm-suppress ImplicitToStringCast assertValidValueReturningKey returns always a string but psalm has currently an issue here */ | ||
$this->key = static::assertValidValueReturningKey($value); | ||
|
||
/** @psalm-var T */ | ||
$this->value = $value; | ||
} | ||
|
||
|
@@ -126,7 +125,6 @@ public function getKey() | |
|
||
/** | ||
* @psalm-pure | ||
* @psalm-suppress InvalidCast | ||
* @return string | ||
*/ | ||
public function __toString() | ||
|
@@ -176,6 +174,7 @@ public static function values() | |
|
||
/** @psalm-var T $value */ | ||
foreach (static::toArray() as $key => $value) { | ||
/** @psalm-suppress UnsafeGenericInstantiation */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO true, generic params may indeed be constrained in children |
||
$values[$key] = new static($value); | ||
} | ||
|
||
|
@@ -186,7 +185,6 @@ public static function values() | |
* Returns all possible values as an array | ||
* | ||
* @psalm-pure | ||
* @psalm-suppress ImpureStaticProperty | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is unused |
||
* | ||
* @psalm-return array<string, mixed> | ||
* @return array Constant name in key, constant value in value | ||
|
@@ -297,6 +295,7 @@ public static function __callStatic($name, $arguments) | |
$message = "No static method or enum constant '$name' in class " . static::class; | ||
throw new \BadMethodCallException($message); | ||
} | ||
/** @psalm-suppress UnsafeGenericInstantiation */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO true, generic params may indeed be constrained in children |
||
return self::$instances[$class][$name] = new static($array[$name]); | ||
} | ||
return clone self::$instances[$class][$name]; | ||
|
@@ -309,6 +308,7 @@ public static function __callStatic($name, $arguments) | |
* @return mixed | ||
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php | ||
* @psalm-pure | ||
* @psalm-suppress UndefinedAttributeClass ReturnTypeWillChange is not available on <PHP8 | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function jsonSerialize() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unused