Skip to content

Commit 5a14c30

Browse files
authored
Merge pull request #6 from php-api-clients/add-leading-lash-to-items-array-type-FQCN
Add leading slash to items array type FQCN
2 parents 0c5126d + 365ca5f commit 5a14c30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Generator/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static function generate(string $name, string $namespace, string $classNa
7777
);
7878
if (is_string($property->type)) {
7979
if ($property->type === 'array' && $property->items instanceof OpenAPiSchema && array_key_exists(spl_object_hash($property->items), $schemaClassNameMap)) {
80-
$docBlock[] = '@var array<' . $namespace . '\\' . $schemaClassNameMap[spl_object_hash($property->items)] . '>';
80+
$docBlock[] = '@var array<\\' . $namespace . '\\' . $schemaClassNameMap[spl_object_hash($property->items)] . '>';
8181
}
8282
$propertyStmt->setType(str_replace([
8383
'integer',

0 commit comments

Comments
 (0)