mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Respect invalid argument syntax used by PHP at ApiPlatformDescriber::__construct()
This commit is contained in:
parent
d604e4c270
commit
3c9bde427e
@ -21,7 +21,7 @@ final class ApiPlatformDescriber extends ExternalDocDescriber
|
|||||||
public function __construct(Documentation $documentation, $normalizer, UrlGeneratorInterface $urlGenerator)
|
public function __construct(Documentation $documentation, $normalizer, UrlGeneratorInterface $urlGenerator)
|
||||||
{
|
{
|
||||||
if (!$normalizer instanceof ApiGatewayNormalizer && !$normalizer instanceof DocumentationNormalizer) {
|
if (!$normalizer instanceof ApiGatewayNormalizer && !$normalizer instanceof DocumentationNormalizer) {
|
||||||
throw new \LogicException(sprintf('Argument $normalizer of %s must be an instance of %s or %s. %s provided.', __METHOD__, ApiGatewayNormalizer::class, DocumentationNormalizer::class, get_class($normalizer)));
|
throw new \InvalidArgumentException(sprintf('Argument 2 passed to %s() must be an instance of %s or %s, %s given.', __METHOD__, ApiGatewayNormalizer::class, DocumentationNormalizer::class, get_class($normalizer)));
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::__construct(function () use ($documentation, $normalizer, $urlGenerator) {
|
parent::__construct(function () use ($documentation, $normalizer, $urlGenerator) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user