Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | class JsonCheckSchemaSubscriber extends AbstractCheckSchemaSubscriber implements EventSubscriberInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var JsonSchemaValidatorFactory |
||
16 | */ |
||
17 | protected $jsonSchemaValidatorFactory; |
||
18 | |||
19 | /** |
||
20 | * @param JsonSchemaValidatorFactory $jsonSchemaValidatorFactory |
||
21 | */ |
||
22 | 4 | public function __construct(JsonSchemaValidatorFactory $jsonSchemaValidatorFactory) |
|
23 | { |
||
24 | 4 | $this->jsonSchemaValidatorFactory = $jsonSchemaValidatorFactory; |
|
25 | 4 | } |
|
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | 8 | public static function getSubscribedEvents(): array |
|
31 | { |
||
32 | return [ |
||
33 | 8 | Events::getCheckSchemaEventNameFor('json') => 'validateSchema', |
|
34 | ]; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | 4 | protected function getSchemaValidatorFactory(): SchemaValidatorFactoryInterface |
|
43 | } |
||
44 | } |
||
45 |