iterator_count() should be used against EXSyst\Component\Swagger\Collections\Responses instead of count().

This commit is contained in:
tamcy 2017-10-12 12:01:51 +08:00
parent 87f40feefc
commit da1c1e66f8

View File

@ -38,7 +38,7 @@ final class DefaultDescriber implements DescriberInterface
$operation = $path->getOperation($method);
// Default Response
if (0 === count($operation->getResponses())) {
if (0 === iterator_count($operation->getResponses())) {
$defaultResponse = $operation->getResponses()->get('default');
$defaultResponse->setDescription('');
}