Skip to content

Commit

Permalink
Empty objects
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Feb 5, 2021
1 parent 65ac528 commit ca31884
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/OpenApi/Serializer/OpenApiNormalizer.php
Expand Up @@ -59,6 +59,10 @@ private function objectToArray($object)
}

if ($object instanceof \ArrayObject) {
if (0 === $object->count()) {
return $object;
}

return array_map([$this, 'objectToArray'], $object->getArrayCopy());
}

Expand Down

0 comments on commit ca31884

Please sign in to comment.