| 1 | <?php |
||
| 9 | class Validator |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param \stdClass $schema The schema to check against the given data |
||
| 13 | * @param mixed $data The data to validate (MUST be decoded JSON data) |
||
| 14 | * |
||
| 15 | * @return bool Whether $data conforms to $schema or not |
||
| 16 | */ |
||
| 17 | 16 | public static function validate(\stdClass $schema, $data): bool |
|
| 25 | } |
||
| 26 |