Skip to content

Commit

Permalink
Fixed Sequence bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ddebowczyk committed Jul 6, 2024
1 parent 4da63b7 commit 89be7d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Schema/Data/Traits/Schema/HandlesFactoryMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function array(string $name = '', string $description = ''): Array
}

public static function object(string $class, string $name = '', string $description = '', $properties = [], $required = []): ObjectSchema {
return (new SchemaFactory)->object($class, $name, $description);
return (new SchemaFactory)->object($class, $name, $description, $properties, $required);
}

public static function enum(string $class, string $name = '', string $description = ''): EnumSchema {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ private function normalizeIfCollection(string $type) : string {
* Express array type as <type>[]
*/
private function collectionTypeString(Type $propertyInfo) : string {
$collectionValueType = $propertyInfo->getCollectionValueTypes()[0];
$collectionValueTypes = $propertyInfo->getCollectionValueTypes();
$collectionValueType = $collectionValueTypes[0] ?? null;
if ($collectionValueType === null) {
return '';
}
Expand Down

0 comments on commit 89be7d9

Please sign in to comment.