Code Duplication    Length = 7-7 lines in 2 locations

graphql.module 2 locations

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