From c7df348233227ecf490ef26795022af6cd26807c Mon Sep 17 00:00:00 2001 From: judge Date: Tue, 10 Sep 2013 16:24:07 +0200 Subject: Fixed coding style --- system/core/Output.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'system') diff --git a/system/core/Output.php b/system/core/Output.php index ec82ae7e8..355a139d5 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -850,23 +850,27 @@ class CI_Output { $output = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!i', '', $output); // Remove Javascript inline comments - if ($has_tags === TRUE && strpos(strtolower($open_tag), 'script') !== FALSE) { - $lines = preg_split('/((\r?\n)|(\n?\r))/',$output); - foreach ($lines as &$line){ + if ($has_tags === TRUE && strpos(strtolower($open_tag), 'script') !== FALSE) + { + $lines = preg_split('/((\r?\n)|(\n?\r))/', $output); + foreach ($lines as &$line) + { $in_string = $in_dstring = FALSE; $len = strlen($line); - for ($i=0; $i<$len; $i++){ - if ( ! $in_string && ! $in_dstring && substr($line,$i,2) === '//'){ - $line = substr($line,0,$i); + for ($i=0; $i<$len; $i++) + { + if ( ! $in_string && ! $in_dstring && substr($line, $i, 2) === '//') + { + $line = substr($line, 0, $i); break; } - if ( $line[$i]==="'" && ! $in_dstring ) + if ($line[$i] === "'" && ! $in_dstring) $in_string = ! $in_string; - else if ( $line[$i]==='"' && ! $in_string ) + elseif ($line[$i] === '"' && ! $in_string) $in_dstring = ! $in_dstring; } } - $output = implode("\n",$lines); + $output = implode("\n", $lines); } // Remove spaces around curly brackets, colons, -- cgit v1.2.3-24-g4f1b