From dd10d4add51114378b190e29fb9ac0eae7decea2 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sun, 9 May 2021 16:20:44 +0200 Subject: [PATCH] Turn objects into arrays Because that is how PHP represents them --- src/Generator/Schema.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Generator/Schema.php b/src/Generator/Schema.php index c14af18..37fd58e 100644 --- a/src/Generator/Schema.php +++ b/src/Generator/Schema.php @@ -79,10 +79,12 @@ public static function generate(string $name, string $namespace, string $classNa $docBlock[] = '@\WyriHaximus\Hydrator\Attribute\HydrateArray(\\' . $namespace . '\\' . $schemaClassNameMap[spl_object_hash($property->items)] . '::class)'; } $t = str_replace([ + 'object', 'integer', 'any', 'boolean', ], [ + 'array', 'int', '', 'bool',