From: Aaron Schulz Date: Wed, 13 Jan 2016 17:00:16 +0000 (-0800) Subject: Small code cleanups to MWCallableUpdate X-Git-Tag: 1.31.0-rc.0~8280^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=3e4dbd35419039d7f4a4f490c225888d5486e6e5;p=lhc%2Fweb%2Fwiklou.git Small code cleanups to MWCallableUpdate Change-Id: I269199f65ffc6ad50d16cb984c28b51a815e9a8f --- 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 ); }