| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class ResponseSubscriber implements EventSubscriberInterface |
||
| 22 | { |
||
| 23 | 597 | public function __construct( |
|
| 24 | private readonly Version $version, |
||
| 25 | ) { |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritdoc} |
||
| 30 | * |
||
| 31 | * @return array<string, array<int, string|int>> |
||
| 32 | */ |
||
| 33 | 1 | public static function getSubscribedEvents(): array |
|
| 39 | ], |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Subscriber method to attach API version to every response. |
||
| 45 | */ |
||
| 46 | 597 | public function onKernelResponse(ResponseEvent $event): void |
|
| 54 |