Remove empty lines at end of functions
[lhc/web/wiklou.git] / includes / libs / CSSMin.php
index ece29e8..bc99672 100644 (file)
@@ -60,41 +60,13 @@ class CSSMin {
        /* Static Methods */
 
        /**
-        * Gets a list of local file paths which are referenced in a CSS style sheet.
-        *
-        * If you wish non-existent files to be listed too, use getAllLocalFileReferences().
-        *
-        * For backwards-compatibility, if the second parameter is not given or null,
-        * this function will return an empty array instead of erroring out.
-        *
-        * @param string $source CSS stylesheet source to process
-        * @param string $path File path where the source was read from
-        * @return array List of local file references
-        */
-       public static function getLocalFileReferences( $source, $path = null ) {
-               if ( $path === null ) {
-                       return [];
-               }
-
-               $files = self::getAllLocalFileReferences( $source, $path );
-
-               // Skip non-existent files
-               $files = array_filter( $files, function ( $file ) {
-                       return file_exists( $file );
-               } );
-
-               return $files;
-       }
-
-       /**
-        * Gets a list of local file paths which are referenced in a CSS style sheet, including
-        * non-existent files.
+        * Get a list of local files referenced in a stylesheet (includes non-existent files).
         *
         * @param string $source CSS stylesheet source to process
         * @param string $path File path where the source was read from
         * @return array List of local file references
         */
-       public static function getAllLocalFileReferences( $source, $path ) {
+       public static function getLocalFileReferences( $source, $path ) {
                $stripped = preg_replace( '/' . self::COMMENT_REGEX . '/s', '', $source );
                $path = rtrim( $path, '/' ) . '/';
                $files = [];
@@ -200,7 +172,7 @@ class CSSMin {
        }
 
        /**
-        * @param $file string
+        * @param string $file
         * @return bool|string
         */
        public static function getMimeType( $file ) {
@@ -347,7 +319,7 @@ class CSSMin {
                                                        );
 
                                                        $url = $match['file'] . $match['query'];
-                                                       $file = $local . $match['file'];
+                                                       $file = "{$local}/{$match['file']}";
                                                        if (
                                                                !self::isRemoteUrl( $url ) && !self::isLocalUrl( $url )
                                                                && file_exists( $file )
@@ -385,7 +357,6 @@ class CSSMin {
                }, $source );
 
                return $source;
-
        }
 
        /**