| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Validator implements ValidatorInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var \Opis\JsonSchema\IValidator |
||
| 13 | */ |
||
| 14 | protected $opisValidator; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \Opis\JsonSchema\ISchema |
||
| 18 | */ |
||
| 19 | protected $opisSchema; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param \Opis\JsonSchema\IValidator $opisValidator |
||
| 23 | * @param \Opis\JsonSchema\ISchema $opisSchema |
||
| 24 | */ |
||
| 25 | public function __construct( |
||
| 26 | OpisValidatorInterface $opisValidator, |
||
| 27 | OpisSchemaInterface $opisSchema |
||
| 28 | ) { |
||
| 29 | $this->opisValidator = $opisValidator; |
||
| 30 | $this->opisSchema = $opisSchema; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $json |
||
| 35 | * |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | public function validate(string $json): bool |
||
| 43 | } |
||
| 44 | } |
||
| 45 |