Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 85a3364

Browse files
Upgrade to Psalm 5
1 parent 43db94c commit 85a3364

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
"require-dev": {
3232
"phpunit/phpunit": "^9.5",
3333
"squizlabs/php_codesniffer": "1.*",
34-
"vimeo/psalm": "^4.6.2"
34+
"vimeo/psalm": "^5.2"
3535
}
3636
}

‎src/Enum.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ public static function values()
176176

177177
/** @psalm-var T $value */
178178
foreach (static::toArray() as $key => $value) {
179+
/** @psalm-suppress UnsafeGenericInstantiation */
179180
$values[$key] = new static($value);
180181
}
181182

@@ -297,6 +298,7 @@ public static function __callStatic($name, $arguments)
297298
$message = "No static method or enum constant '$name' in class " . static::class;
298299
throw new \BadMethodCallException($message);
299300
}
301+
/** @psalm-suppress UnsafeGenericInstantiation */
300302
return self::$instances[$class][$name] = new static($array[$name]);
301303
}
302304
return clone self::$instances[$class][$name];
@@ -308,7 +310,6 @@ public static function __callStatic($name, $arguments)
308310
*
309311
* @return mixed
310312
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
311-
* @psalm-pure
312313
*/
313314
#[\ReturnTypeWillChange]
314315
public function jsonSerialize()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /