*
* @param string $key
* @param bool &$success
+ * @return bool
*/
protected function fetchResult( $key, &$success ) {
$success = false;
$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 );
}
* @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 );