1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Removed templated parameters from ReflectionClass#isInstance()

These templates were leading to false positives: assuming
an `object` is given as input, the inferred return
type would always have been `true`, which is obviously
not valid.

Removing them is the healthier alternative, for now.

Ref: https://github.com/vimeo/psalm/pull/8722#discussion_r1027102713
This commit is contained in:
Marco Pivetta 2022-12-06 11:21:09 +01:00
parent d9a0cc5311
commit 79a1a8b26c

View File

@ -192,15 +192,7 @@ class ReflectionClass implements Reflector {
*/
public function getModifiers(): bool {}
/**
* @template TCheckedObject of object
*
* @param TCheckedObject $object
*
* @return (TCheckedObject is T ? true : bool)
*
* @psalm-pure
*/
/** @psalm-pure */
public function isInstance(object $object): bool {}
/**