X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdeferred%2FCallableUpdate.php;h=4b19c200663c6c71ea69503b023778d62c7ce088;hb=92f6090948a202e8f1a5bb57c1319d0be6fd4c26;hp=f0569dde5c9dde3fec12363f0336bd64fd1af9ee;hpb=075b90235e86de663c000db2c90253509bb97375;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/CallableUpdate.php b/includes/deferred/CallableUpdate.php index f0569dde5c..4b19c20066 100644 --- a/includes/deferred/CallableUpdate.php +++ b/includes/deferred/CallableUpdate.php @@ -4,25 +4,20 @@ * Deferrable Update for closure/callback */ class MWCallableUpdate implements DeferrableUpdate { - /** - * @var closure/callback - */ + /** @var Closure|callable */ private $callback; /** * @param callable $callback - * @throws MWException + * @throws InvalidArgumentException */ public function __construct( $callback ) { if ( !is_callable( $callback ) ) { - throw new MWException( 'Not a valid callback/closure!' ); + throw new InvalidArgumentException( 'Not a valid callback/closure!' ); } $this->callback = $callback; } - /** - * Run the update - */ public function doUpdate() { call_user_func( $this->callback ); }