X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=includes%2Fgallery%2FImageGalleryBase.php;h=c6d8ddf3db38b0b7215691c3511652f2c24090fb;hb=f5360c82b810a05b35e8de3f983ecf2deea1961a;hp=06e12710b648d6ba1f799f94c8b5cef8614efc85;hpb=3a026473873ac3cc9d5c181f05961f474495d32c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index 06e12710b6..c6d8ddf3db 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -75,21 +75,21 @@ abstract class ImageGalleryBase extends ContextSource { protected $mHideBadImages; /** - * @var Parser Registered parser object for output callbacks + * @var Parser|false Registered parser object for output callbacks */ public $mParser; /** - * @var Title Contextual title, used when images are being screened against + * @var Title|null Contextual title, used when images are being screened against * the bad image list */ - protected $contextTitle = false; + protected $contextTitle = null; /** @var array */ protected $mAttribs = []; - /** @var bool */ - private static $modeMapping = false; + /** @var array */ + private static $modeMapping; /** * Get a new image gallery. This is the method other callers @@ -121,7 +121,7 @@ abstract class ImageGalleryBase extends ContextSource { } private static function loadModes() { - if ( self::$modeMapping === false ) { + if ( self::$modeMapping === null ) { self::$modeMapping = [ 'traditional' => TraditionalImageGallery::class, 'nolines' => NolinesImageGallery::class, @@ -363,7 +363,7 @@ abstract class ImageGalleryBase extends ContextSource { /** * Set the contextual title * - * @param Title $title Contextual title + * @param Title|null $title Contextual title */ public function setContextTitle( $title ) { $this->contextTitle = $title; @@ -372,12 +372,10 @@ abstract class ImageGalleryBase extends ContextSource { /** * Get the contextual title, if applicable * - * @return Title|bool Title or false + * @return Title|null */ public function getContextTitle() { - return is_object( $this->contextTitle ) && $this->contextTitle instanceof Title - ? $this->contextTitle - : false; + return $this->contextTitle; } /**