44
55namespace Usox \JsonSchemaApi \Dispatch ;
66
7+ use Usox \JsonSchemaApi \Dispatch \Exception \SchemaNotFoundException ;
8+ use Usox \JsonSchemaApi \Dispatch \Exception \SchemaNotLoadableException ;
79use stdClass ;
810use Teapot \StatusCode ;
911use Usox \JsonSchemaApi \Dispatch \Exception \SchemaInvalidException ;
@@ -13,15 +15,15 @@ final class SchemaLoader implements SchemaLoaderInterface
1315 /**
1416 * Loads and returns the schema content
1517 *
16- * @throws Exception\ SchemaInvalidException
17- * @throws Exception\ SchemaNotFoundException
18- * @throws Exception\ SchemaNotLoadableException
18+ * @throws SchemaInvalidException
19+ * @throws SchemaNotFoundException
20+ * @throws SchemaNotLoadableException
1921 */
2022 public function load (
2123 string $ schemaFilePath
2224 ): stdClass {
2325 if (file_exists ($ schemaFilePath ) === false ) {
24- throw new Exception \ SchemaNotFoundException (
26+ throw new SchemaNotFoundException (
2527 sprintf ('Schema file `%s` not found ' , $ schemaFilePath ),
2628 StatusCode::INTERNAL_SERVER_ERROR
2729 );
@@ -30,7 +32,7 @@ public function load(
3032 $ fileContent = @file_get_contents ($ schemaFilePath );
3133
3234 if ($ fileContent === false ) {
33- throw new Exception \ SchemaNotLoadableException (
35+ throw new SchemaNotLoadableException (
3436 sprintf ('Schema file `%s` not loadable ' , $ schemaFilePath ),
3537 StatusCode::INTERNAL_SERVER_ERROR
3638 );
0 commit comments