Skip to content

Commit 3b20b2c

Browse files
authored
Merge pull request #28 from php-api-clients/no-default-values
No default values
2 parents 3aa5bac + 0b67cc0 commit 3b20b2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Generator/Schema.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ public static function generate(string $name, string $namespace, string $classNa
113113

114114
if (is_array($property->anyOf) && $property->anyOf[0] instanceof OpenAPiSchema && array_key_exists(spl_object_hash($property->anyOf[0]), $schemaClassNameMap)) {
115115
$fqcnn = '\\' . $rootNamespace . '\\' . $schemaClassNameMap[spl_object_hash($property->anyOf[0])];
116-
$propertyStmt->setType( $fqcnn)->setDefault(null);
116+
$propertyStmt->setType( $fqcnn);
117117
$method->setReturnType( $fqcnn);
118118
$propertyDocBlock[] = '@\WyriHaximus\Hydrator\Attribute\Hydrate(' . $fqcnn . '::class)';
119119
}
120120

121121
if ($property->type === 'object' && $property instanceof OpenAPiSchema && array_key_exists(spl_object_hash($property), $schemaClassNameMap)) {
122122
$fqcnn = '\\' . $rootNamespace . '\\' . $schemaClassNameMap[spl_object_hash($property)];
123-
$propertyStmt->setType( $fqcnn)->setDefault(null);
123+
$propertyStmt->setType( $fqcnn);
124124
$method->setReturnType( $fqcnn);
125125
$propertyDocBlock[] = '@\WyriHaximus\Hydrator\Attribute\Hydrate(' . $fqcnn . '::class)';
126126
}

0 commit comments

Comments
 (0)