@ -157,11 +157,11 @@ class SchemaBuilder
return $schema;
}
/**
* @throws SchemaDocumentFieldNameUnsetException
*/
private static function GenerateSchemaReflectionObject(ReflectionClass $reflection): array
public static function GenerateSchema(string $targetSchemaClassName): array
{
$reflection = new ReflectionClass(new $targetSchemaClassName());
$schema = [];
/*
@ -181,12 +181,6 @@ class SchemaBuilder
return $schema;
}
public static function GenerateSchema(string $targetSchemaClassName): array
{
$reflection = new ReflectionClass(new $targetSchemaClassName());
return self::GenerateSchemaReflectionObject($reflection);
}
/**
* Generates the Schema using the SchemaBuilder::GenerateSchema() function, sets the http header to application/json, echos the schema as JSON, then dies.
*