Skip to content

Commit 753f8b6

Browse files
authored
Merge pull request #97 from php-api-clients/ensure-all-scaler-array-properties-are-represented-as-such-in-examples
Ensure all scalar array properties are represented as such in examples
2 parents ad9b69b + 228b5c2 commit 753f8b6

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)