From 45435d05a5a0833e6e92b5af79ac00cf52b8458e Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 1 Dec 2018 10:10:41 +0100 Subject: [PATCH] Change typehint callback to callable Found by PHPStan. Change-Id: I09f21da69ad9b9357cee85a47717dbe1bca04070 --- includes/libs/objectcache/WANObjectCache.php | 2 +- includes/search/SearchSuggestionSet.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index e7586cfe02..ed5c7f57c7 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -1166,7 +1166,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * * @param string $key * @param int $ttl - * @param callback $callback + * @param callable $callback * @param array $opts Options map for getWithSetCallback() * @param float|null &$asOf Cache generation timestamp of returned value [returned] * @return mixed diff --git a/includes/search/SearchSuggestionSet.php b/includes/search/SearchSuggestionSet.php index cb1f831711..f1da246134 100644 --- a/includes/search/SearchSuggestionSet.php +++ b/includes/search/SearchSuggestionSet.php @@ -80,7 +80,7 @@ class SearchSuggestionSet { /** * Call array_map on the suggestions array - * @param callback $callback + * @param callable $callback * @return array */ public function map( $callback ) { @@ -89,7 +89,7 @@ class SearchSuggestionSet { /** * Filter the suggestions array - * @param callback $callback Callable accepting single SearchSuggestion + * @param callable $callback Callable accepting single SearchSuggestion * instance returning bool false to remove the item. * @return int The number of suggestions removed */ -- 2.20.1