Code Duplication    Length = 7-7 lines in 2 locations

graphql.module 2 locations

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