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
class Example
{
public const TYPE_A = 'a';
public const TYPE_B = 'b';
/**
* @phpstan-param Example::TYPE_* $type
*/
public function __construct(private string $type)
{
}
public function getType(): string {
return $this->type;
}
}
Throws error message: Unable to run constraint on class. "\Example::TYPE_*" is not a valid Fqsen.
The text was updated successfully, but these errors were encountered:
frankdekker
changed the title
phpstan-var Class::CONST_* throws exceptions
phpstan-param Class::CONST_* throws exceptions
Jun 25, 2022
Yes that syntax is not supported at the moment.
Using https://github.com/phpDocumentor/TypeResolver to check the phpdoc, and that package doesn't have too much support for the phpstan/psalm syntax.
Throws error message:
Unable to run constraint on class. "\Example::TYPE_*" is not a valid Fqsen.
The text was updated successfully, but these errors were encountered: