Code Duplication    Length = 7-7 lines in 2 locations

graphql.module 2 locations

@@ 136-142 (lines=7) @@
133
function graphql_graphql_schema_operations($pluginId, array $pluginDefinition) {
134
  $operations = [];
135
136
  if (\Drupal::currentUser()->hasPermission('use graphql explorer')) {
137
    $operations['explorer'] = [
138
      'title' => 'Explorer',
139
      'weight' => 10,
140
      'url' => Url::fromRoute("graphql.explorer.$pluginId"),
141
    ];
142
  }
143
144
  if (\Drupal::currentUser()->hasPermission('use graphql voyager')) {
145
    $operations['voyager'] = [
@@ 144-150 (lines=7) @@
141
    ];
142
  }
143
144
  if (\Drupal::currentUser()->hasPermission('use graphql voyager')) {
145
    $operations['voyager'] = [
146
      'title' => 'Voyager',
147
      'weight' => 10,
148
      'url' => Url::fromRoute("graphql.voyager.$pluginId"),
149
    ];
150
  }
151
152
  return $operations;
153
}