diff --git a/src/SchemaBuilder/SchemaBuilder.php b/src/SchemaBuilder/SchemaBuilder.php index 914bcb3..7142c5d 100644 --- a/src/SchemaBuilder/SchemaBuilder.php +++ b/src/SchemaBuilder/SchemaBuilder.php @@ -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. *