Skip to content
Snippets Groups Projects
Commit 1bb76232 authored by Elliot Ward's avatar Elliot Ward
Browse files

#3337250: :recycle: Use property promotion for $jsonapiClient in TypedResourceObjectStringFormatter .

parent 42479a60
No related branches found
No related tags found
1 merge request!13#3337250: ♻️ Use property promotion for $jsonapiClient in TypedResourceObjectStringFormatter .
......@@ -24,13 +24,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*/
class TypedResourceObjectStringFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
/**
* The JSON:API reference client.
*
* @var \Drupal\jsonapi_reference\JsonApiClientInterface
*/
protected $jsonapiClient;
/**
* Constructs a new TypedResourceObjectStringFormatter.
*
......@@ -51,7 +44,7 @@ class TypedResourceObjectStringFormatter extends FormatterBase implements Contai
* @param \Drupal\jsonapi_reference\JsonApiClientInterface $jsonapi_client
* The JSON:API reference client.
*/
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, JsonApiClientInterface $jsonapi_client) {
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, protected JsonApiClientInterface $jsonapi_client) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->jsonapiClient = $jsonapi_client;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment