X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FCSSMin.php;h=d3a02f7e56fd5c08dd4227600bdf2a6fc5982677;hb=2664eeb6325b7c662faa813c99487b1a479299e5;hp=92a4f9e6f42ba581bbba5cd519b9d6ca91ab3044;hpb=e143c40fee88922eb393a88f94e60afc439d1f49;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php index 92a4f9e6f4..d3a02f7e56 100644 --- a/includes/libs/CSSMin.php +++ b/includes/libs/CSSMin.php @@ -29,7 +29,7 @@ */ class CSSMin { - /** @var string Strip marker for comments. **/ + /** @var string Strip marker for comments. */ const PLACEHOLDER = "\x7fPLACEHOLDER\x7f"; /** @@ -202,11 +202,7 @@ class CSSMin { public static function getMimeType( $file ) { // Infer the MIME-type from the file extension $ext = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) ); - if ( isset( self::$mimeTypes[$ext] ) ) { - return self::$mimeTypes[$ext]; - } - - return mime_content_type( realpath( $file ) ); + return self::$mimeTypes[$ext] ?? mime_content_type( realpath( $file ) ); } /** @@ -411,14 +407,14 @@ class CSSMin { // FIXME: Simplify now we only support PHP 7.0.0+ // Note: PCRE doesn't support multiple capture groups with the same name by default. // - PCRE 6.7 introduced the "J" modifier (PCRE_INFO_JCHANGED for PCRE_DUPNAMES). - // https://secure.php.net/manual/en/reference.pcre.pattern.modifiers.php + // https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php // However this isn't useful since it just ignores all but the first one. // Also, while the modifier was introduced in PCRE 6.7 (PHP 5.2+) it was // not exposed to public preg_* functions until PHP 5.6.0. // - PCRE 8.36 fixed this to work as expected (e.g. merge conceptually to // only return the one matched in the part that actually matched). // However MediaWiki supports 5.5.9, which has PCRE 8.32 - // Per https://secure.php.net/manual/en/pcre.installation.php: + // Per https://www.php.net/manual/en/pcre.installation.php: // - PCRE 8.32 (PHP 5.5.0) // - PCRE 8.34 (PHP 5.5.10, PHP 5.6.0) // - PCRE 8.37 (PHP 5.5.26, PHP 5.6.9, PHP 7.0.0)