Skip to content

Commit 228b5c2

Browse files
committed
Ensure all scalar array properties are represented as such in examples
1 parent ad9b69b commit 228b5c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Gatherer/Property.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ public static function gather(
100100
} else {
101101
$exampleData = 'generated_' . $propertyName;
102102
}
103-
104-
if ($type === 'array') {
105-
$exampleData = [$exampleData];
106-
}
107103
}
108104
$type = new PropertyType(
109105
'scalar',
110106
$type
111107
);
112108
}
113109

110+
if ($type->payload === 'array') {
111+
$exampleData = [$exampleData];
112+
}
113+
114114
if (!is_array($type)) {
115115
$type = [$type];
116116
}

0 commit comments

Comments
 (0)