Browse Source

general tidying up

dev
Cerys 3 weeks ago
parent
commit
7768caa8fa
  1. 14
      src/SchemaBuilder/SchemaBuilder.php

14
src/SchemaBuilder/SchemaBuilder.php

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

Loading…
Cancel
Save