Change typehint callback to callable
authorJakub Vrana <jakub@vrana.cz>
Sat, 1 Dec 2018 09:10:41 +0000 (10:10 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 1 Dec 2018 09:10:41 +0000 (10:10 +0100)
Found by PHPStan.

Change-Id: I09f21da69ad9b9357cee85a47717dbe1bca04070

includes/libs/objectcache/WANObjectCache.php
includes/search/SearchSuggestionSet.php

index e7586cf..ed5c7f5 100644 (file)
@@ -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
index cb1f831..f1da246 100644 (file)
@@ -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
         */