mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-24 00:13:27 +00:00
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:
parent
d53a6eab3a
commit
0ac32cb375
|
@ -1,8 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<ruleset>
|
<ruleset>
|
||||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
|
||||||
<exclude name="MediaWiki.Usage.NullableType.ExplicitNullableTypes" />
|
|
||||||
</rule>
|
|
||||||
<file>.</file>
|
<file>.</file>
|
||||||
<arg name="extensions" value="php" />
|
<arg name="extensions" value="php" />
|
||||||
<arg name="encoding" value="UTF-8" />
|
<arg name="encoding" value="UTF-8" />
|
||||||
|
|
|
@ -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 ) {
|
||||||
|
|
Loading…
Reference in a new issue