Code Duplication    Length = 7-7 lines in 2 locations

src/GraphQL/Schema/SchemaLoader.php 1 location

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

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.