Use the expression assignment operator to simplify code

Suggested by phan, available since php7.4

Change-Id: Iadee84c7b62f9aeac31ade702bc33764d35ef9c8
This commit is contained in:
Umherirrender 2023-10-14 00:55:37 +02:00
parent 5dd3212097
commit 09d47340eb

View file

@ -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 ) {