Total Complexity | 8 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
9 | class JsonSchemaValidator |
||
10 | { |
||
11 | protected $jsonSchema; |
||
12 | protected $rawData; |
||
13 | |||
14 | public function setSchema(string $filePath): void |
||
15 | { |
||
16 | if (!file_exists($filePath)) { |
||
17 | throw new JsonSchemaValidatorException(JsonSchemaValidatorException::FILE_DOESNT_EXIST); |
||
18 | } |
||
19 | |||
20 | $this->jsonSchema = (string) file_get_contents($filePath); |
||
21 | } |
||
22 | |||
23 | public function getSchema(): stdClass |
||
26 | } |
||
27 | |||
28 | public function setData(string $data): void |
||
31 | } |
||
32 | |||
33 | public function getData(): stdClass |
||
36 | } |
||
37 | |||
38 | public function validate(): bool |
||
58 |