Closed
Description
<?php
use MyCLabs\Enum\Enum;
/**
* @method static Level __default()
* @method static Level intOnly()
* @method static Level full()
*
* @psalm-immutable
*/
class Level extends Enum
{
private const __default = 'intOnly';
private const intOnly = 'intOnly';
private const full = 'full';
}
This now leads to
ERROR: TooManyTemplateParams - ../../myclabs/php-enum/src/Enum.php:54:21 - MyNameSpace\Level<T:MyCLabs\Enum\Enum as mixed> has too many template params, expecting 0 (see https://psalm.dev/184)
* @psalm-param static<T>|T $value
Any ideas on how to work around this?
Metadata
Metadata
Assignees
Labels
No labels