summaryrefslogtreecommitdiffstats
path: root/system/core/Output.php
diff options
context:
space:
mode:
authorjudge <mjnaderi@gmail.com>2013-09-10 16:24:07 +0200
committerjudge <mjnaderi@gmail.com>2013-09-10 16:24:07 +0200
commitc7df348233227ecf490ef26795022af6cd26807c (patch)
treeb095aa02dd6e36db408d2234ea6c88bdbd7e18f5 /system/core/Output.php
parentf57ecc141e072473c73630af29ffe06be25e850c (diff)
Fixed coding style
Diffstat (limited to 'system/core/Output.php')
-rw-r--r--system/core/Output.php22
1 files changed, 13 insertions, 9 deletions
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,