mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-04-02 21:36:14 +03:00
Merge pull request #1262 from phansys/API-PLAT
Respect invalid argument syntax used by PHP at `ApiPlatformDescriber::__construct()`
This commit is contained in:
commit
be54acd3ad
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