Code Duplication    Length = 7-9 lines in 2 locations

geodirectory-admin/google-api-php-client/src/io/Google_IO.php 2 locations

@@ 59-67 (lines=9) @@
56
   * @return bool Returns true if the insertion was successful.
57
   * Otherwise, return false.
58
   */
59
  protected function setCachedRequest(Google_HttpRequest $request) {
60
    // Determine if the request is cacheable.
61
    if (Google_CacheParser::isResponseCacheable($request)) {
62
      Google_Client::$cache->set($request->getCacheKey(), $request);
63
      return true;
64
    }
65
66
    return false;
67
  }
68
69
  /**
70
   * @visible for testing.
@@ 75-81 (lines=7) @@
72
   * @return Google_HttpRequest|bool Returns the cached object or
73
   * false if the operation was unsuccessful.
74
   */
75
  protected function getCachedRequest(Google_HttpRequest $request) {
76
    if (false == Google_CacheParser::isRequestCacheable($request)) {
77
      false;
78
    }
79
80
    return Google_Client::$cache->get($request->getCacheKey());
81
  }
82
83
  /**
84
   * @visible for testing