mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-27 17:50:53 +00:00
Use the expression assignment operator to simplify code
Suggested by phan, available since php7.4 Change-Id: Iadee84c7b62f9aeac31ade702bc33764d35ef9c8
This commit is contained in:
parent
5dd3212097
commit
09d47340eb
|
@ -73,7 +73,7 @@ class SearchResultProvideThumbnailHookHandler implements SearchResultProvideThum
|
|||
*/
|
||||
public function onSearchResultProvideThumbnail( array $pageIdentities, &$results, int $size = null ): void {
|
||||
$fileNamesByPageId = $this->getFileNamesByPageId( $pageIdentities );
|
||||
$results = $results ?? [];
|
||||
$results ??= [];
|
||||
foreach ( $fileNamesByPageId as $pageId => $fileName ) {
|
||||
$file = $this->repoGroup->findFile( $fileName );
|
||||
if ( !$file ) {
|
||||
|
|
Loading…
Reference in a new issue