Use ::class for class name

This works also for non-existing classes,
because it is resolved on compile time

Change-Id: I789df6994b22529a8bc09123369dae0f1b52d565
This commit is contained in:
Umherirrender 2021-04-08 21:02:46 +02:00
parent 42afa92436
commit 5740d02758

View file

@ -57,7 +57,7 @@ class CreatePdfThumbnailsJob extends Job {
global $wgImageLimits;
// Ignore user preferences, do default thumbnails
// everything here shamelessy copied and reused from includes/ImagePage.php
if ( method_exists( '\MediaWiki\User\UserOptionsLookup', 'getDefaultOption' ) ) {
if ( method_exists( \MediaWiki\User\UserOptionsLookup::class, 'getDefaultOption' ) ) {
// MW 1.35+
$userOptionsLookup = MediaWikiServices::getInstance()->getUserOptionsLookup();
$sizeSel = $userOptionsLookup->getDefaultOption( 'imagesize' );