From c973491965e780fe83a3ec3451e602c733083f87 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sat, 29 Jun 2024 20:41:43 +0000 Subject: [PATCH] PopupsContextTestWrapper: Remove null check for $gadgetsIntegration $gadgetsIntegration can never be null. This is ensured by the PHP type check. Change-Id: Ia70e8b8b329ba771dcb8a98d4a78220c2f0f5fbf --- tests/phpunit/PopupsContextTestWrapper.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/PopupsContextTestWrapper.php b/tests/phpunit/PopupsContextTestWrapper.php index 5aaffd6f3..ca6277415 100644 --- a/tests/phpunit/PopupsContextTestWrapper.php +++ b/tests/phpunit/PopupsContextTestWrapper.php @@ -42,7 +42,7 @@ class PopupsContextTestWrapper extends PopupsContext { * * @param Config $config MediaWiki config * @param ExtensionRegistry $extensionRegistry MediaWiki extension registry - * @param PopupsGadgetsIntegration|null $gadgetsIntegration Gadgets integration helper + * @param PopupsGadgetsIntegration $gadgetsIntegration Gadgets integration helper * @param UserOptionsLookup $userOptionsLookup */ public function __construct( @@ -51,8 +51,7 @@ class PopupsContextTestWrapper extends PopupsContext { PopupsGadgetsIntegration $gadgetsIntegration, UserOptionsLookup $userOptionsLookup ) { - $gadgetsIntegration = $gadgetsIntegration ?: - new PopupsGadgetsIntegration( $config, $extensionRegistry ); + $gadgetsIntegration = $gadgetsIntegration; parent::__construct( $config,