media: Mark ImageHandler::getScriptParams() as protected
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Mon, 25 Feb 2019 09:20:28 +0000 (10:20 +0100)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Mon, 25 Feb 2019 09:20:28 +0000 (10:20 +0100)
Proof this method is really not called from anywhere else, except the
ImageHandler class itself, and one subclass:

https://codesearch.wmflabs.org/search/?q=%5CSgetScriptParams&i=1

Change-Id: I57e75ce0cb7c9e52d545b8e8226610bcc6e06c44

includes/media/DjVuHandler.php
includes/media/ImageHandler.php
includes/media/JpegHandler.php
includes/media/SvgHandler.php

index 4413525..ed62ba1 100644 (file)
@@ -130,7 +130,7 @@ class DjVuHandler extends ImageHandler {
         * @param array $params
         * @return array
         */
-       function getScriptParams( $params ) {
+       protected function getScriptParams( $params ) {
                return [
                        'width' => $params['width'],
                        'page' => $params['page'],
index b7042dc..302e743 100644 (file)
@@ -74,7 +74,7 @@ abstract class ImageHandler extends MediaHandler {
                }
        }
 
-       function getScriptParams( $params ) {
+       protected function getScriptParams( $params ) {
                return [ 'width' => $params['width'] ];
        }
 
index eaf842e..4bcb53d 100644 (file)
@@ -90,7 +90,7 @@ class JpegHandler extends ExifBitmapHandler {
                return $res;
        }
 
-       function getScriptParams( $params ) {
+       protected function getScriptParams( $params ) {
                $res = parent::getScriptParams( $params );
                if ( isset( $params['quality'] ) ) {
                        $res['quality'] = $params['quality'];
index 436483b..b7745df 100644 (file)
@@ -594,7 +594,7 @@ class SvgHandler extends ImageHandler {
         * @param array $params
         * @return array
         */
-       function getScriptParams( $params ) {
+       protected function getScriptParams( $params ) {
                $scriptParams = [ 'width' => $params['width'] ];
                if ( isset( $params['lang'] ) ) {
                        $scriptParams['lang'] = $params['lang'];