Mark closure in KeywordHighlighter as static
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 13 Jun 2022 10:07:09 +0000 (12:07 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 13 Jun 2022 10:07:09 +0000 (12:07 +0200)
see 406348deb7debaeaa908db6fc1a724a40e82e8a3

wcfsetup/install/files/lib/system/bbcode/KeywordHighlighter.class.php

index 1184838d9e2668d5dfdc758837220dfc2ee422cc..ce250a59dd432bf07b57827623137dcd63ffe121 100644 (file)
@@ -130,7 +130,7 @@ class KeywordHighlighter extends SingletonFactory
         // Exclude words that are less than 3 characters, because those
         // are often times stoppwords that are not matched by the search
         // engine, but can appear a lot of times in regular text.
-        $this->keywords = \array_filter($this->keywords, function (string $keyword) {
+        $this->keywords = \array_filter($this->keywords, static function (string $keyword): bool {
             return \mb_strlen($keyword) > 2;
         });
     }