You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
any psalm config with error level 4 (see example below)
class which implements Ds\Hashable and declares hashable method like this: public function equals($obj): bool (just like in polyfill stubs [1] and in extension [2])
Expected: no error - parameter named just like in polyfill and extension
Actual:
ERROR: ParamNameMismatch
at .../test.php:9:28
Argument 1 of Issue::equals has wrong name $obj, expecting $object as defined by Ds\Hashable::equals (see https://psalm.dev/230)
public function equals($obj): bool
https://psalm.dev/r/ac4b9d77f6 (cannot be reproduced in playground - no installed
ds
extension)STR:
ds
extensionDs\Hashable
and declareshashable
method like this:public function equals($obj): bool
(just like in polyfill stubs [1] and in extension [2])Expected: no error - parameter named just like in polyfill and extension
Actual:
class
psalm config
Possible reason - parameter name declared in psalm's CallMap:
[1] https://github.com/php-ds/polyfill/blob/7b2c5f1843466d50769a0682ce6fa9ddaaa99cb4/src/Hashable.php#L25-L31
[2] https://github.com/php-ds/ext-ds/blob/5f8915dae22596ce468543b78591170a7da8736d/src/php/classes/php_hashable_ce.c#L8-L15
The text was updated successfully, but these errors were encountered: