-
Notifications
You must be signed in to change notification settings - Fork 665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class_implements
should return class-string type
#4749
Comments
I found these snippets: https://psalm.dev/r/886622aa50<?php declare(strict_types = 1);
class B {}
interface F {}
class HelloWorld extends B implements F
{
}
/** @param class-string[] $p */
function p($p) {
}
$p = class_parents(HelloWorld::class);
if ($p)
p($p);
$p = class_implements(HelloWorld::class);
if ($p)
p($p);
|
This is easy to fix but I'm not sure what the long term vision is here. There are two string pseudo-types: I'm not sure why there isn't a full |
I guess we could just return interface-strings. Please propose a PR if you want :) |
https://psalm.dev/r/886622aa50
didn't expect
The text was updated successfully, but these errors were encountered: