@@ -136,7 +136,7 @@ |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | // gets foreach id |
139 | - $cnt = self::$cnt ++; |
|
139 | + $cnt = self::$cnt++; |
|
140 | 140 | |
141 | 141 | // build pre content output |
142 | 142 | $pre = Compiler::PHP_OPEN . "\n" . '$_fh' . $cnt . '_data = ' . $src . ';'; |
@@ -72,13 +72,13 @@ |
||
72 | 72 | break; |
73 | 73 | } |
74 | 74 | |
75 | - $this->wrap = (int)$wrap; |
|
76 | - $this->wrapChar = (string)$wrap_char; |
|
77 | - $this->wrapCut = (bool)$wrap_cut; |
|
78 | - $this->indent = (int)$indent; |
|
79 | - $this->indChar = (string)$indent_char; |
|
80 | - $this->indFirst = (int)$indent_first + $this->indent; |
|
81 | - $this->assign = (string)$assign; |
|
75 | + $this->wrap = (int) $wrap; |
|
76 | + $this->wrapChar = (string) $wrap_char; |
|
77 | + $this->wrapCut = (bool) $wrap_cut; |
|
78 | + $this->indent = (int) $indent; |
|
79 | + $this->indChar = (string) $indent_char; |
|
80 | + $this->indFirst = (int) $indent_first + $this->indent; |
|
81 | + $this->assign = (string) $assign; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $show = $params['show']; |
80 | 80 | |
81 | 81 | // gets unique id |
82 | - $cnt = self::$cnt ++; |
|
82 | + $cnt = self::$cnt++; |
|
83 | 83 | |
84 | 84 | $output .= '$this->globals[\'section\'][' . $name . '] = array();' . "\n" . '$_section' . $cnt . ' =& $this->globals[\'section\'][' . $name . '];' . "\n"; |
85 | 85 |
@@ -110,7 +110,7 @@ |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | // gets foreach id |
113 | - $cnt = self::$cnt ++; |
|
113 | + $cnt = self::$cnt++; |
|
114 | 114 | |
115 | 115 | // builds pre processing output |
116 | 116 | $pre = Compiler::PHP_OPEN . "\n" . '$_loop' . $cnt . '_data = ' . $src . ';'; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | reset($params); |
64 | 64 | while (list($k, $v) = each($params)) { |
65 | - $v = (string)$v; |
|
65 | + $v = (string) $v; |
|
66 | 66 | if (substr($v, 0, 1) === '"' || substr($v, 0, 1) === '\'') { |
67 | 67 | $vmod = strtolower(substr($v, 1, - 1)); |
68 | 68 | } else { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | } else { |
178 | 178 | $negate = false; |
179 | 179 | } |
180 | - $ptr = 1 + (int)$negate; |
|
180 | + $ptr = 1 + (int) $negate; |
|
181 | 181 | if ($tokens[$k + $ptr] !== Compiler::T_UNQUOTED_STRING) { |
182 | 182 | break; |
183 | 183 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $pluginType = $params['__functype']; |
54 | 54 | $params = $params['*']; |
55 | 55 | |
56 | - if ($pluginType & Core::CUSTOM_PLUGIN) { |
|
56 | + if ($pluginType&Core::CUSTOM_PLUGIN) { |
|
57 | 57 | $customPlugins = $compiler->getCore()->getCustomPlugins(); |
58 | 58 | $callback = $customPlugins[$func]['callback']; |
59 | 59 | if (is_array($callback)) { |
@@ -64,8 +64,7 @@ |
||
64 | 64 | $compiler->findBlock('dynamic'); |
65 | 65 | |
66 | 66 | return $content; |
67 | - } |
|
68 | - catch (CompilationException $e) { |
|
67 | + } catch (CompilationException $e) { |
|
69 | 68 | } |
70 | 69 | $output = Compiler::PHP_OPEN . 'if($doCache) {' . "\n\t" . 'echo \'<dwoo:dynamic_\'.$dynamicId.\'>' . str_replace('\'', '\\\'', $content) . '</dwoo:dynamic_\'.$dynamicId.\'>\';' . "\n} else {\n\t"; |
71 | 70 | if (substr($content, 0, strlen(Compiler::PHP_OPEN)) == Compiler::PHP_OPEN) { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $this, |
43 | 43 | 'convertSection' |
44 | 44 | ), $input); |
45 | - $input = str_replace('$smarty.section.', '$smarty.for.', $input); |
|
45 | + $input = str_replace('$smarty.section.', '$smarty.for.', $input); |
|
46 | 46 | |
47 | 47 | $smarty = array( |
48 | 48 | '/' . $rl . '\s*ldelim\s*' . $rr . '/', |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public static function compile(Compiler $compiler, $value, $search, $replace, $case_sensitive = true) |
45 | 45 | { |
46 | - if ($case_sensitive == 'false' || (bool)$case_sensitive === false) { |
|
46 | + if ($case_sensitive == 'false' || (bool) $case_sensitive === false) { |
|
47 | 47 | return 'str_ireplace(' . $search . ', ' . $replace . ', ' . $value . ')'; |
48 | 48 | } else { |
49 | 49 | return 'str_replace(' . $search . ', ' . $replace . ', ' . $value . ')'; |