From 6710b80d4fc48f4d1f99f4c606eec41d03147491 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 16 Dec 2020 16:17:22 +0000 Subject: [PATCH] Make Hooks::$tags a constant Change-Id: I63bacc9bc6fc18ef677325439b6186d1813d23cf --- includes/Hooks.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 505df098f..75ecb444d 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -27,7 +27,7 @@ use WebRequest; class Hooks { - private static $tags = [ + private const TAGS = [ 'discussiontools', // Features: 'discussiontools-reply', @@ -319,7 +319,7 @@ class Hooks { * @param array &$tags Available change tags. */ public static function onListDefinedTags( array &$tags ) : void { - $tags = array_merge( $tags, static::$tags ); + $tags = array_merge( $tags, static::TAGS ); } /** @@ -338,7 +338,7 @@ class Hooks { $request = RequestContext::getMain()->getRequest(); $tags = explode( ',', $request->getVal( 'dttags' ) ); - $tags = array_values( array_intersect( $tags, static::$tags ) ); + $tags = array_values( array_intersect( $tags, static::TAGS ) ); if ( $tags ) { $recentChange->addTags( $tags );