| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class ResponseSubscriber implements EventSubscriberInterface |
||
| 22 | { |
||
| 23 | 477 | public function __construct( |
|
| 26 | 477 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritdoc} |
||
| 30 | * |
||
| 31 | * @return array<string, array<int, string|int>> |
||
| 32 | */ |
||
| 33 | 2 | public static function getSubscribedEvents(): array |
|
| 34 | { |
||
| 35 | return [ |
||
| 36 | ResponseEvent::class => [ |
||
| 37 | 2 | 'onKernelResponse', |
|
| 38 | 10, |
||
| 39 | ], |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Subscriber method to attach API version to every response. |
||
| 45 | */ |
||
| 46 | 477 | public function onKernelResponse(ResponseEvent $event): void |
|
| 50 | 477 | } |
|
| 51 | } |
||
| 52 |