Make CSSMin::getMimeType public rather than protected
authorOri Livneh <ori@wikimedia.org>
Wed, 18 Sep 2013 03:58:39 +0000 (20:58 -0700)
committerKrinkle <krinklemail@gmail.com>
Wed, 18 Sep 2013 04:09:21 +0000 (04:09 +0000)
There's no reason why it should be protected. People sometimes use
'protected' to mean 'ancillary to the main purpose of the class', but
'protected' comes with the added cost of making the class API less
flexible. I intend to call this method in a future revision of Id052a04dd2,
but I think it should be public regardless.

Change-Id: I56365df3152df1180ce73de98202e3a91def1485

includes/libs/CSSMin.php

index 8b0e287..17e1258 100644 (file)
@@ -85,7 +85,7 @@ class CSSMin {
         * @param $file string
         * @return bool|string
         */
-       protected static function getMimeType( $file ) {
+       public static function getMimeType( $file ) {
                $realpath = realpath( $file );
                // Try a couple of different ways to get the mime-type of a file, in order of
                // preference