Use explicit nullable type on parameter arguments (for PHP 8.4)

Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.

Bug: T376276
Change-Id: I2f17c7e8c6365795f7a54738b0e607b6f35c9df2
This commit is contained in:
Andre Klapper 2024-10-26 15:09:15 +02:00
parent 198b3e7f68
commit 871cb29005

View file

@ -71,7 +71,7 @@ class SearchResultProvideThumbnailHookHandler implements SearchResultProvideThum
* @param array &$results Placeholder for result. $pageId => SearchResultThumbnail * @param array &$results Placeholder for result. $pageId => SearchResultThumbnail
* @param int|null $size size of thumbnail height and width in points * @param int|null $size size of thumbnail height and width in points
*/ */
public function onSearchResultProvideThumbnail( array $pageIdentities, &$results, int $size = null ): void { public function onSearchResultProvideThumbnail( array $pageIdentities, &$results, ?int $size = null ): void {
$fileNamesByPageId = $this->getFileNamesByPageId( $pageIdentities ); $fileNamesByPageId = $this->getFileNamesByPageId( $pageIdentities );
$results ??= []; $results ??= [];
foreach ( $fileNamesByPageId as $pageId => $fileName ) { foreach ( $fileNamesByPageId as $pageId => $fileName ) {