dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix MessagecacheTest::testLoadFromDB_fetchLatestRevision"
[lhc/web/wiklou.git]
/
includes
/
libs
/
MemoizedCallable.php
diff --git
a/includes/libs/MemoizedCallable.php
b/includes/libs/MemoizedCallable.php
index
90c7a64
..
e9d1fc1
100644
(file)
--- a/
includes/libs/MemoizedCallable.php
+++ b/
includes/libs/MemoizedCallable.php
@@
-75,6
+75,7
@@
class MemoizedCallable {
*
* @param string $key
* @param bool &$success
*
* @param string $key
* @param bool &$success
+ * @return bool
*/
protected function fetchResult( $key, &$success ) {
$success = false;
*/
protected function fetchResult( $key, &$success ) {
$success = false;
@@
-122,7
+123,7
@@
class MemoizedCallable {
$success = false;
$result = $this->fetchResult( $key, $success );
if ( !$success ) {
$success = false;
$result = $this->fetchResult( $key, $success );
if ( !$success ) {
- $result =
call_user_func_array( $this->callable,
$args );
+ $result =
( $this->callable )( ...
$args );
$this->storeResult( $key, $result );
}
$this->storeResult( $key, $result );
}
@@
-148,6
+149,7
@@
class MemoizedCallable {
* @param callable $callable
* @param array $args
* @param int $ttl
* @param callable $callable
* @param array $args
* @param int $ttl
+ * @return mixed
*/
public static function call( $callable, array $args = [], $ttl = 3600 ) {
$instance = new self( $callable, $ttl );
*/
public static function call( $callable, array $args = [], $ttl = 3600 ) {
$instance = new self( $callable, $ttl );