Skip to content
Snippets Groups Projects

fix config and update type hint

Merged Patrick Kenny requested to merge issue/jsonapi_links-3497801:fix_config into 1.1.x
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -42,7 +42,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
protected ConfigFactoryInterface $configFactory,
protected RouteMatchInterface $currentRouteMatch,
) {
$this->config = $this->configFactory->get('jsonapi_links');
$this->config = $this->configFactory->get('jsonapi_links.settings');
}
/**
@@ -110,7 +110,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
/**
* Unsets links in JSON:API responses.
*/
protected function removeLinks(mixed &$data, ?string $node = NULL): void {
protected function removeLinks(mixed &$data, string|int|null $node = NULL): void {
if (!is_null($node)) {
$this->path[] = $node;
}
Loading