projects
/
pharext
/
pharext.org
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
yet another github api refactoring
[pharext/pharext.org]
/
app
/
Github
/
API
/
Call.php
diff --git
a/app/Github/API/Call.php
b/app/Github/API/Call.php
index d4afd19eeb3c375408162728293622a2f2e2b12c..22a69516e3f7fb60d466e3eac46b1522e6e13122 100644
(file)
--- a/
app/Github/API/Call.php
+++ b/
app/Github/API/Call.php
@@
-35,6
+35,11
@@
abstract class Call
*/
protected $query;
*/
protected $query;
+ /**
+ * @var array
+ */
+ protected $result;
+
/**
* Queue this call to the API client
*/
/**
* Queue this call to the API client
*/
@@
-58,8
+63,8
@@
abstract class Call
}
function __invoke(callable $callback) {
}
function __invoke(callable $callback) {
- if ($this->readFromCache($
cached
)) {
- call_user_func_array($callback, $
cached
);
+ if ($this->readFromCache($
this->result
)) {
+ call_user_func_array($callback, $
this->result
);
} else {
$this->enqueue($callback);
}
} else {
$this->enqueue($callback);
}
@@
-79,7
+84,8
@@
abstract class Call
* Call Client::send()
*/
function send() {
* Call Client::send()
*/
function send() {
- return $this->api->getClient()->send();
+ $this->api->getClient()->send();
+ return $this->result;
}
/**
}
/**