From 621484ca7b08862d0fea42e1892b2aa112ab4022 Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 28 Oct 2024 22:22:03 +0000 Subject: [PATCH] Use explicit nullable type on parameter arguments Bug: T376276 Change-Id: Ic96b569cb73534d00f2ccd43829235351c6889c3 --- includes/ConfigHelper.php | 2 +- .../Requirements/LimitedWidthContentRequirement.php | 2 +- .../Requirements/UserPreferenceRequirement.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/ConfigHelper.php b/includes/ConfigHelper.php index 007714b43..f9b94a5ad 100644 --- a/includes/ConfigHelper.php +++ b/includes/ConfigHelper.php @@ -32,7 +32,7 @@ class ConfigHelper { * * @return bool */ - public static function shouldDisable( array $options, WebRequest $request, Title $title = null ) { + public static function shouldDisable( array $options, WebRequest $request, ?Title $title = null ) { $canonicalTitle = $title ? $title->getRootTitle() : null; $exclusions = $options[ 'exclude' ] ?? []; diff --git a/includes/FeatureManagement/Requirements/LimitedWidthContentRequirement.php b/includes/FeatureManagement/Requirements/LimitedWidthContentRequirement.php index 323df4fb4..03bae1af9 100644 --- a/includes/FeatureManagement/Requirements/LimitedWidthContentRequirement.php +++ b/includes/FeatureManagement/Requirements/LimitedWidthContentRequirement.php @@ -48,7 +48,7 @@ final class LimitedWidthContentRequirement implements Requirement { public function __construct( Config $config, WebRequest $request, - Title $title = null + ?Title $title = null ) { $this->config = $config; $this->title = $title; diff --git a/includes/FeatureManagement/Requirements/UserPreferenceRequirement.php b/includes/FeatureManagement/Requirements/UserPreferenceRequirement.php index b352b1cf1..b236ac697 100644 --- a/includes/FeatureManagement/Requirements/UserPreferenceRequirement.php +++ b/includes/FeatureManagement/Requirements/UserPreferenceRequirement.php @@ -61,7 +61,7 @@ final class UserPreferenceRequirement implements Requirement { string $optionName, string $requirementName, WebRequest $request, - Title $title = null + ?Title $title = null ) { $this->user = $user; $this->userOptionsLookup = $userOptionsLookup;