mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-04-01 21:06:15 +03:00
Respect invalid argument syntax used by PHP at ApiPlatformDescriber::__construct()
This commit is contained in:
parent
d604e4c270
commit
3c9bde427e
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ final class ApiPlatformDescriber extends ExternalDocDescriber
|
|||
public function __construct(Documentation $documentation, $normalizer, UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue