From ce251d15b7ccbaee4720ea2d162f34382d2011e6 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Fri, 27 May 2016 19:30:14 -0700 Subject: [PATCH] WatchedItemStore: Use callable type hint instead of Assert library And remove an unused use statement. Change-Id: Idb74a564088744d73f71f5ef17e8f84f6e484c69 --- includes/WatchedItemStore.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php index 6486955fc4..515fbfce86 100644 --- a/includes/WatchedItemStore.php +++ b/includes/WatchedItemStore.php @@ -1,7 +1,6 @@ deferredUpdatesAddCallableUpdateCallback; $this->deferredUpdatesAddCallableUpdateCallback = $callback; return new ScopedCallback( function() use ( $previousValue ) { @@ -106,14 +103,12 @@ class WatchedItemStore implements StatsdAwareInterface { * @return ScopedCallback to reset the overridden value * @throws MWException */ - public function overrideRevisionGetTimestampFromIdCallback( $callback ) { + public function overrideRevisionGetTimestampFromIdCallback( callable $callback ) { if ( !defined( 'MW_PHPUNIT_TEST' ) ) { throw new MWException( 'Cannot override Revision::getTimestampFromId callback in operation.' ); } - Assert::parameterType( 'callable', $callback, '$callback' ); - $previousValue = $this->revisionGetTimestampFromIdCallback; $this->revisionGetTimestampFromIdCallback = $callback; return new ScopedCallback( function() use ( $previousValue ) { -- 2.20.1