From 3e4dbd35419039d7f4a4f490c225888d5486e6e5 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 13 Jan 2016 09:00:16 -0800 Subject: [PATCH] Small code cleanups to MWCallableUpdate Change-Id: I269199f65ffc6ad50d16cb984c28b51a815e9a8f --- includes/deferred/CallableUpdate.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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 ); } -- 2.20.1