aboutsummaryrefslogtreecommitdiffstats
path: root/includes/gallery
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2020-05-10 10:39:38 +0200
committerReedy <reedy@wikimedia.org>2020-05-10 22:13:22 +0000
commitae7649bf6df0cbd85ae3025b5e6b5e645d991437 (patch)
tree44c4ed0308df720096c57451c08fcbad3193b168 /includes/gallery
parentaccb26eaa4f688b18043a2830d8cdf4c90151f13 (diff)
downloadmediawikicore-ae7649bf6df0cbd85ae3025b5e6b5e645d991437.tar.gz
mediawikicore-ae7649bf6df0cbd85ae3025b5e6b5e645d991437.zip
Add missing visibility on methods/consts of gallery related classes
Change-Id: Ib8d3d3b12ff2aa4d5be8610dee52798c12958c73
Diffstat (limited to 'includes/gallery')
-rw-r--r--includes/gallery/ImageGalleryBase.php22
-rw-r--r--includes/gallery/PackedImageGallery.php2
-rw-r--r--includes/gallery/TraditionalImageGallery.php2
3 files changed, 13 insertions, 13 deletions
diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php
index 7c73c28a5562..37a17ecf23b8 100644
--- a/includes/gallery/ImageGalleryBase.php
+++ b/includes/gallery/ImageGalleryBase.php
@@ -110,7 +110,7 @@ abstract class ImageGalleryBase extends ContextSource {
* @return ImageGalleryBase
* @throws MWException
*/
- static function factory( $mode = false, IContextSource $context = null ) {
+ public static function factory( $mode = false, IContextSource $context = null ) {
self::loadModes();
if ( !$context ) {
$context = RequestContext::getMainAndWarn( __METHOD__ );
@@ -182,7 +182,7 @@ abstract class ImageGalleryBase extends ContextSource {
*
* @param Parser $parser
*/
- function setParser( $parser ) {
+ public function setParser( $parser ) {
$this->mParser = $parser;
}
@@ -190,7 +190,7 @@ abstract class ImageGalleryBase extends ContextSource {
* Set bad image flag
* @param bool $flag
*/
- function setHideBadImages( $flag = true ) {
+ public function setHideBadImages( $flag = true ) {
$this->mHideBadImages = $flag;
}
@@ -199,7 +199,7 @@ abstract class ImageGalleryBase extends ContextSource {
*
* @param string $caption
*/
- function setCaption( $caption ) {
+ public function setCaption( $caption ) {
$this->mCaption = htmlspecialchars( $caption );
}
@@ -270,7 +270,7 @@ abstract class ImageGalleryBase extends ContextSource {
* @param string $link Override image link (optional)
* @param array $handlerOpts Array of options for image handler (aka page number)
*/
- function add( $title, $html = '', $alt = '', $link = '', $handlerOpts = [] ) {
+ public function add( $title, $html = '', $alt = '', $link = '', $handlerOpts = [] ) {
if ( $title instanceof File ) {
// Old calling convention
$title = $title->getTitle();
@@ -289,7 +289,7 @@ abstract class ImageGalleryBase extends ContextSource {
* @param string $link Override image link (optional)
* @param array $handlerOpts Array of options for image handler (aka page number)
*/
- function insert( $title, $html = '', $alt = '', $link = '', $handlerOpts = [] ) {
+ public function insert( $title, $html = '', $alt = '', $link = '', $handlerOpts = [] ) {
if ( $title instanceof File ) {
// Old calling convention
$title = $title->getTitle();
@@ -310,7 +310,7 @@ abstract class ImageGalleryBase extends ContextSource {
* isEmpty() returns true if the gallery contains no images
* @return bool
*/
- function isEmpty() {
+ public function isEmpty() {
return empty( $this->mImages );
}
@@ -320,7 +320,7 @@ abstract class ImageGalleryBase extends ContextSource {
*
* @param bool $f Set to false to disable
*/
- function setShowDimensions( $f ) {
+ public function setShowDimensions( $f ) {
$this->mShowDimensions = (bool)$f;
}
@@ -330,7 +330,7 @@ abstract class ImageGalleryBase extends ContextSource {
*
* @param bool $f Set to false to disable
*/
- function setShowBytes( $f ) {
+ public function setShowBytes( $f ) {
$this->mShowBytes = (bool)$f;
}
@@ -340,7 +340,7 @@ abstract class ImageGalleryBase extends ContextSource {
*
* @param bool $f Set to false to disable
*/
- function setShowFilename( $f ) {
+ public function setShowFilename( $f ) {
$this->mShowFilename = (bool)$f;
}
@@ -353,7 +353,7 @@ abstract class ImageGalleryBase extends ContextSource {
*
* @param array $attribs Array of HTML attribute pairs
*/
- function setAttributes( $attribs ) {
+ public function setAttributes( $attribs ) {
$this->mAttribs = $attribs;
}
diff --git a/includes/gallery/PackedImageGallery.php b/includes/gallery/PackedImageGallery.php
index 4518ab8cbbdf..f543bd2888b9 100644
--- a/includes/gallery/PackedImageGallery.php
+++ b/includes/gallery/PackedImageGallery.php
@@ -32,7 +32,7 @@ class PackedImageGallery extends TraditionalImageGallery {
* we can scale it up by that much on the client side, without
* worrying about requesting a new image.
*/
- const SCALE_FACTOR = 1.5;
+ private const SCALE_FACTOR = 1.5;
protected function getVPad( $boxHeight, $thumbHeight ) {
return ( $this->getThumbPadding() + $boxHeight - $thumbHeight / self::SCALE_FACTOR ) / 2;
diff --git a/includes/gallery/TraditionalImageGallery.php b/includes/gallery/TraditionalImageGallery.php
index 180eb6191e4c..6c3777531a85 100644
--- a/includes/gallery/TraditionalImageGallery.php
+++ b/includes/gallery/TraditionalImageGallery.php
@@ -36,7 +36,7 @@ class TraditionalImageGallery extends ImageGalleryBase {
*
* @return string
*/
- function toHTML() {
+ public function toHTML() {
$resolveFilesViaParser = $this->mParser instanceof Parser;
if ( $resolveFilesViaParser ) {
$out = $this->mParser->getOutput();