@@ -54,7 +54,7 @@ |
||
| 54 | 54 | public static function preProcessing(Compiler $compiler, array $params, $prepend, $append, $type) |
| 55 | 55 | { |
| 56 | 56 | $params = $compiler->getCompiledParams($params); |
| 57 | - switch (strtolower(trim((string)$params['enabled'], '"\''))) { |
|
| 57 | + switch (strtolower(trim((string) $params['enabled'], '"\''))) { |
|
| 58 | 58 | |
| 59 | 59 | case 'on': |
| 60 | 60 | case 'true': |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | |
| 89 | 89 | $pre = Compiler::PHP_OPEN . 'if (' . $cparams['var'] . ')' . "\n{\n" . '$_with' . (self::$cnt) . ' = $this->setScope("' . $rparams['var'] . '");' . "\n/* -- start with output */\n" . Compiler::PHP_CLOSE; |
| 90 | 90 | |
| 91 | - $post = Compiler::PHP_OPEN . "\n/* -- end with output */\n" . '$this->setScope($_with' . (self::$cnt ++) . ', true);' . "\n}\n" . Compiler::PHP_CLOSE; |
|
| 91 | + $post = Compiler::PHP_OPEN . "\n/* -- end with output */\n" . '$this->setScope($_with' . (self::$cnt++) . ', true);' . "\n}\n" . Compiler::PHP_CLOSE; |
|
| 92 | 92 | |
| 93 | 93 | if (isset($params['hasElse'])) { |
| 94 | 94 | $post .= $params['hasElse']; |
@@ -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)) { |
@@ -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 . '/', |