diff --git a/src/Gatherer/Property.php b/src/Gatherer/Property.php index 9c3fb85..8349ce8 100644 --- a/src/Gatherer/Property.php +++ b/src/Gatherer/Property.php @@ -100,10 +100,6 @@ public static function gather( } else { $exampleData = 'generated_' . $propertyName; } - - if ($type === 'array') { - $exampleData = [$exampleData]; - } } $type = new PropertyType( 'scalar', @@ -111,6 +107,10 @@ public static function gather( ); } + if ($type->payload === 'array') { + $exampleData = [$exampleData]; + } + if (!is_array($type)) { $type = [$type]; }