From e662614f95228614e575f6148678c35cdbc19f58 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Wed, 16 Oct 2024 20:58:33 +0200 Subject: Use explicit nullable type on parameter arguments Implicitly marking parameter $... as nullable is deprecated in php8.4, the explicit nullable type must be used instead Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a Break one long line in SpecialPage.php Bug: T376276 Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e --- includes/diff/SlotDiffRenderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/diff/SlotDiffRenderer.php') diff --git a/includes/diff/SlotDiffRenderer.php b/includes/diff/SlotDiffRenderer.php index 9da566cf0ef0..2c03dd9e390c 100644 --- a/includes/diff/SlotDiffRenderer.php +++ b/includes/diff/SlotDiffRenderer.php @@ -52,7 +52,7 @@ abstract class SlotDiffRenderer { * @return string HTML. One or more tags, or an empty string if the inputs are identical. * @throws IncompatibleDiffTypesException */ - abstract public function getDiff( Content $oldContent = null, Content $newContent = null ); + abstract public function getDiff( ?Content $oldContent = null, ?Content $newContent = null ); /** * Localize language-independent text returned by getDiff(), making it @@ -109,7 +109,7 @@ abstract class SlotDiffRenderer { * @throws IncompatibleDiffTypesException */ protected function normalizeContents( - Content &$oldContent = null, Content &$newContent = null, $allowedClasses = null + ?Content &$oldContent = null, ?Content &$newContent = null, $allowedClasses = null ) { if ( !$oldContent && !$newContent ) { throw new InvalidArgumentException( '$oldContent and $newContent cannot both be null' ); -- cgit v1.2.3