build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0
[lhc/web/wiklou.git] / includes / search / SearchSuggestionSet.php
index a1f9a04..6d54dad 100644 (file)
@@ -17,7 +17,6 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
- *
  */
 
 /**
@@ -28,13 +27,13 @@ class SearchSuggestionSet {
        /**
         * @var SearchSuggestion[]
         */
-       private $suggestions = array();
+       private $suggestions = [];
 
        /**
         *
         * @var array
         */
-       private $pageMap = array();
+       private $pageMap = [];
 
        /**
         * Builds a new set of suggestions.
@@ -181,7 +180,7 @@ class SearchSuggestionSet {
         */
        public static function fromTitles( array $titles ) {
                $score = count( $titles );
-               $suggestions = array_map( function( $title ) use ( &$score ) {
+               $suggestions = array_map( function ( $title ) use ( &$score ) {
                        return SearchSuggestion::fromTitle( $score--, $title );
                }, $titles );
                return new SearchSuggestionSet( $suggestions );
@@ -197,17 +196,16 @@ class SearchSuggestionSet {
         */
        public static function fromStrings( array $titles ) {
                $score = count( $titles );
-               $suggestions = array_map( function( $title ) use ( &$score ) {
+               $suggestions = array_map( function ( $title ) use ( &$score ) {
                        return SearchSuggestion::fromText( $score--, $title );
                }, $titles );
                return new SearchSuggestionSet( $suggestions );
        }
 
-
        /**
         * @return SearchSuggestionSet an empty suggestion set
         */
        public static function emptySuggestionSet() {
-               return new SearchSuggestionSet( array() );
+               return new SearchSuggestionSet( [] );
        }
 }