mirror of
https://github.com/mrclay/minify.git
synced 2025-08-14 01:54:11 +02:00
Big style cleanup
This commit is contained in:
@@ -72,21 +72,16 @@ class Minify_CommentPreserver
|
||||
*/
|
||||
private static function _nextComment($in)
|
||||
{
|
||||
if (
|
||||
false === ($start = strpos($in, '/*!'))
|
||||
|| false === ($end = strpos($in, '*/', $start + 3))
|
||||
) {
|
||||
if (false === ($start = strpos($in, '/*!')) || false === ($end = strpos($in, '*/', $start + 3))) {
|
||||
return array($in, false, false);
|
||||
}
|
||||
$ret = array(
|
||||
substr($in, 0, $start)
|
||||
,self::$prepend . '/*!' . substr($in, $start + 3, $end - $start - 1) . self::$append
|
||||
);
|
||||
$endChars = (strlen($in) - $end - 2);
|
||||
$ret[] = (0 === $endChars)
|
||||
? ''
|
||||
: substr($in, -$endChars);
|
||||
|
||||
return $ret;
|
||||
$beforeComment = substr($in, 0, $start);
|
||||
$comment = self::$prepend . '/*!' . substr($in, $start + 3, $end - $start - 1) . self::$append;
|
||||
|
||||
$endChars = (strlen($in) - $end - 2);
|
||||
$afterComment = (0 === $endChars) ? '' : substr($in, -$endChars);
|
||||
|
||||
return array($beforeComment, $comment, $afterComment);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user