From a2bed51e2baa1767009c130232ee078fd22d46c0 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Fri, 16 Mar 2012 14:45:45 -0400 Subject: [PATCH] CSSmin: whitespace cleanup --- min/lib/CSSMin.php | 40 +++++----------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/min/lib/CSSMin.php b/min/lib/CSSMin.php index f74755c..96659f2 100644 --- a/min/lib/CSSMin.php +++ b/min/lib/CSSMin.php @@ -23,11 +23,9 @@ class CSSmin { - private $comments = array(); private $preserved_tokens = array(); - /** * @param bool $raisePhpSettingsLimits if true, raisePhpSettingLimits() will * be called. @@ -145,7 +143,6 @@ class CSSmin ); } - /** * Configure PHP to use at least the suggested minimum settings * @@ -300,16 +297,14 @@ class CSSmin return $css; } - - - /** - * Utility method to replace all data urls with tokens before we start - * compressing, to avoid performance issues running some of the subsequent - * regexes against large strings chunks. - */ + * Utility method to replace all data urls with tokens before we start + * compressing, to avoid performance issues running some of the subsequent + * regexes against large strings chunks. + * * @param string $css * @return string + */ private function extract_data_urls($css) { // Leave data urls alone to increase parse performance. @@ -373,9 +368,6 @@ class CSSmin return implode('', $sb); } - - - /** * Utility method to compress hex color values of the form #AABBCC to #ABC. * @@ -428,14 +420,10 @@ class CSSmin return implode('', $sb); } - - /* CALLBACKS * --------------------------------------------------------------------------------------------- */ - - private function callback_one($matches) { $match = $matches[0]; @@ -458,25 +446,16 @@ class CSSmin return $quote . '___YUICSSMIN_PRESERVED_TOKEN_' . (count($this->preserved_tokens) - 1) . '___' . $quote; } - - - private function callback_two($matches) { return preg_replace('/\:/', '___YUICSSMIN_PSEUDOCLASSCOLON___', $matches[0]); } - - - private function callback_three($matches) { return strtolower($matches[1]) . ':0 0' . $matches[2]; } - - - private function callback_four($matches) { $rgbcolors = explode(',', $matches[1]); @@ -489,23 +468,15 @@ class CSSmin return '#' . implode('', $rgbcolors); } - - - private function callback_five($matches) { return strtolower($matches[1]) . ':0' . $matches[2]; } - - - /* HELPERS * --------------------------------------------------------------------------------------------- */ - - /** * PHP port of Javascript's "indexOf" function * Author: Tubal Martin http://blog.margenn.com @@ -522,7 +493,6 @@ class CSSmin return ($index !== FALSE) ? $index : -1; } - /** * PHP port of Javascript's "substring" function * Author: Tubal Martin http://blog.margenn.com