Code Duplication    Length = 7-7 lines in 2 locations

graphql.module 2 locations

@@ 174-180 (lines=7) @@
171
function graphql_graphql_schema_operations($pluginId, array $pluginDefinition) {
172
  $operations = [];
173
174
  if (\Drupal::currentUser()->hasPermission('use graphql explorer')) {
175
    $operations['explorer'] = [
176
      'title' => 'Explorer',
177
      'weight' => 10,
178
      'url' => Url::fromRoute("graphql.explorer.$pluginId"),
179
    ];
180
  }
181
182
  if (\Drupal::currentUser()->hasPermission('use graphql voyager')) {
183
    $operations['voyager'] = [
@@ 182-188 (lines=7) @@
179
    ];
180
  }
181
182
  if (\Drupal::currentUser()->hasPermission('use graphql voyager')) {
183
    $operations['voyager'] = [
184
      'title' => 'Voyager',
185
      'weight' => 10,
186
      'url' => Url::fromRoute("graphql.voyager.$pluginId"),
187
    ];
188
  }
189
190
  return $operations;
191
}