given a class, that defines multiple constants with the same prefix. with PHPStan it is possible to declare e.g. a parameter in the following way:
use Symfony\Component\HttpFoundation\Request;
/**
* @param Request::METHOD_* $httpMethod
*/
public function foo(string $httpMethod): void
so every value of a constant of the Request class that starts with METHOD_ is allowed.
TypePHP is currently failing with
Argument $httpMethod must be literal Symfony\Component\HttpFoundation\Request::METHOD_*, string 'POST' given
given a class, that defines multiple constants with the same prefix. with PHPStan it is possible to declare e.g. a parameter in the following way:
so every value of a constant of the Request class that starts with
METHOD_is allowed.TypePHP is currently failing with