Skip to content
Snippets Groups Projects

fix settings and type hint

Merged Patrick Kenny requested to merge issue/jsonapi_links-3497801:fix_config_10 into 1.0.x
@@ -54,7 +54,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
@@ -54,7 +54,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
}
}
public function __construct(ConfigFactoryInterface $config_factory, CurrentRouteMatch $current_route_match) {
public function __construct(ConfigFactoryInterface $config_factory, CurrentRouteMatch $current_route_match) {
$this->config = $config_factory->get('jsonapi_links');
$this->config = $config_factory->get('jsonapi_links.settings');
$this->currentRouteMatch = $current_route_match;
$this->currentRouteMatch = $current_route_match;
}
}
@@ -100,7 +100,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
@@ -100,7 +100,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
/**
/**
* Unsets links in JSON:API responses.
* Unsets links in JSON:API responses.
*/
*/
protected function removeLinks(&$data, ?string $node = NULL) {
protected function removeLinks(&$data, string|int|null $node = NULL) {
if ($node) {
if ($node) {
$this->path[] = $node;
$this->path[] = $node;
}
}
Loading