X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdeferred%2FCallableUpdate.php;h=4b19c200663c6c71ea69503b023778d62c7ce088;hb=92f6090948a202e8f1a5bb57c1319d0be6fd4c26;hp=808626d0f9b5c7557e0395c9a31ae25665a79dd4;hpb=05b8af8b91dac965c67571668187d1dc2511ae03;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/CallableUpdate.php b/includes/deferred/CallableUpdate.php index 808626d0f9..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|callable - */ + /** @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 ); }