Code Duplication    Length = 6-8 lines in 2 locations

src/Plugin/Field/FieldWidget/EntityReference.php 1 location

@@ 93-98 (lines=6) @@
90
   * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $key_value
91
   *   The key value store.
92
   */
93
  public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityManagerInterface $entity_manager, EventDispatcherInterface $event_dispatcher, FieldWidgetDisplayManager $field_display_manager, KeyValueStoreExpirableInterface $key_value) {
94
    parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
95
    $this->entityManager = $entity_manager;
96
    $this->fieldDisplayManager = $field_display_manager;
97
    $this->keyValue = $key_value;
98
  }
99
100
  /**
101
   * {@inheritdoc}

src/WidgetBase.php 1 location

@@ 92-99 (lines=8) @@
89
   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
90
   *   Event dispatcher service.
91
   */
92
  public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, KeyValueStoreExpirableInterface $key_value, Request $request) {
93
    parent::__construct($configuration, $plugin_id, $plugin_definition);
94
    $this->eventDispatcher = $event_dispatcher;
95
    $this->entityManager = $entity_manager;
96
    $this->setConfiguration($configuration);
97
    $this->keyValue = $key_value;
98
    $this->request = $request;
99
  }
100
101
  /**
102
   * {@inheritdoc}