Code Duplication    Length = 7-7 lines in 2 locations

src/GraphQL/Execution/QueryProcessor.php 1 location

@@ 191-197 (lines=7) @@
188
   *
189
   * @see \Drupal\Core\Cache\CacheBackendInterface::set()
190
   */
191
  protected function maxAgeToExpire($maxAge) {
192
    if ($maxAge === Cache::PERMANENT) {
193
      return Cache::PERMANENT;
194
    }
195
196
    return (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME') + $maxAge;
197
  }
198
199
  /**
200
   * Generates a cache identifier for the passed cache contexts.

src/GraphQL/Schema/SchemaLoader.php 1 location

@@ 237-243 (lines=7) @@
234
   *
235
   * @see \Drupal\Core\Cache\CacheBackendInterface::set()
236
   */
237
  protected function maxAgeToExpire($maxAge) {
238
    if ($maxAge === Cache::PERMANENT) {
239
      return Cache::PERMANENT;
240
    }
241
242
    return (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME') + $maxAge;
243
  }
244
245
  /**
246
   * Generates a cache identifier for the passed cache contexts.