fix saveToCache() usage; move hook controllers around
[pharext/pharext.org] / app / Github / API / Call.php
index f40e4866f6b837764b4b999798bca96453f13560..3615851693f1870d2094ea70d8a3a018298326f6 100644 (file)
@@ -96,7 +96,7 @@ abstract class Call
                        new QueryString($this->args));
        }
 
-       function readFromCache(&$cached = null, &$ttl = null) {
+       function readFromCache(array &$cached = null, &$ttl = null) {
                if (empty($this->args["fresh"]) && ($cache = $this->api->getCacheStorage())) {
                        $key = $this->getCacheKey();
                        return $cache->get($key, $cached, $ttl);
@@ -104,7 +104,7 @@ abstract class Call
                return false;
        }
        
-       function saveToCache($fresh) {
+       function saveToCache(array $fresh) {
                if (($cache = $this->api->getCacheStorage())) {
                        if (isset($this->config->storage->cache->{$this}->ttl)) {
                                $ttl = $this->config->storage->cache->{$this}->ttl;