@@ -40,6 +40,6 @@ |
||
40 | 40 | */ |
41 | 41 | public static function compile(Compiler $compiler, $value, $default = '') |
42 | 42 | { |
43 | - return '(($tmp = ' . $value . ')===null||$tmp===\'\' ? ' . $default . ' : $tmp)'; |
|
43 | + return '(($tmp = '.$value.')===null||$tmp===\'\' ? '.$default.' : $tmp)'; |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | \ No newline at end of file |
@@ -39,6 +39,6 @@ |
||
39 | 39 | */ |
40 | 40 | public static function compile(Compiler $compiler, $value, array $rest) |
41 | 41 | { |
42 | - return '(' . $value . ').(' . implode(').(', $rest) . ')'; |
|
42 | + return '('.$value.').('.implode(').(', $rest).')'; |
|
43 | 43 | } |
44 | 44 | } |
@@ -41,9 +41,9 @@ |
||
41 | 41 | public static function compile(Compiler $compiler, $value, $count_spaces = false) |
42 | 42 | { |
43 | 43 | if ($count_spaces === 'false') { |
44 | - return 'preg_match_all(\'#[^\s\pZ]#u\', ' . $value . ', $tmp)'; |
|
44 | + return 'preg_match_all(\'#[^\s\pZ]#u\', '.$value.', $tmp)'; |
|
45 | 45 | } |
46 | 46 | |
47 | - return 'mb_strlen(' . $value . ', $this->charset)'; |
|
47 | + return 'mb_strlen('.$value.', $this->charset)'; |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | \ No newline at end of file |
@@ -45,29 +45,29 @@ |
||
45 | 45 | |
46 | 46 | if ($tpl === null) { |
47 | 47 | throw new CompilationException($compiler, |
48 | - 'Load Templates : Resource "' . $resource . ':' . $identifier . '" not found.'); |
|
48 | + 'Load Templates : Resource "'.$resource.':'.$identifier.'" not found.'); |
|
49 | 49 | } elseif ($tpl === false) { |
50 | 50 | throw new CompilationException($compiler, |
51 | - 'Load Templates : Resource "' . $resource . '" does not support includes.'); |
|
51 | + 'Load Templates : Resource "'.$resource.'" does not support includes.'); |
|
52 | 52 | } |
53 | 53 | |
54 | - $out = '\'\';// checking for modification in ' . $resource . ':' . $identifier . "\r\n"; |
|
54 | + $out = '\'\';// checking for modification in '.$resource.':'.$identifier."\r\n"; |
|
55 | 55 | |
56 | 56 | $modCheck = $tpl->getIsModifiedCode(); |
57 | 57 | |
58 | 58 | if ($modCheck) { |
59 | - $out .= 'if (!(' . $modCheck . ')) { ob_end_clean(); return false; }'; |
|
59 | + $out .= 'if (!('.$modCheck.')) { ob_end_clean(); return false; }'; |
|
60 | 60 | } else { |
61 | 61 | $out .= 'try { |
62 | - $tpl = $this->templateFactory("' . $resource . '", "' . $identifier . '"); |
|
62 | + $tpl = $this->templateFactory("' . $resource.'", "'.$identifier.'"); |
|
63 | 63 | } catch (Dwoo\Exception $e) { |
64 | - $this->triggerError(\'Load Templates : Resource <em>' . $resource . '</em> was not added to Dwoo, can not extend <em>' . $identifier . '</em>\', E_USER_WARNING); |
|
64 | + $this->triggerError(\'Load Templates : Resource <em>' . $resource.'</em> was not added to Dwoo, can not extend <em>'.$identifier.'</em>\', E_USER_WARNING); |
|
65 | 65 | } |
66 | 66 | if ($tpl === null) |
67 | - $this->triggerError(\'Load Templates : Resource "' . $resource . ':' . $identifier . '" was not found.\', E_USER_WARNING); |
|
67 | + $this->triggerError(\'Load Templates : Resource "' . $resource.':'.$identifier.'" was not found.\', E_USER_WARNING); |
|
68 | 68 | elseif ($tpl === false) |
69 | - $this->triggerError(\'Load Templates : Resource "' . $resource . '" does not support extends.\', E_USER_WARNING); |
|
70 | -if ($tpl->getUid() != "' . $tpl->getUid() . '") { ob_end_clean(); return false; }'; |
|
69 | + $this->triggerError(\'Load Templates : Resource "' . $resource.'" does not support extends.\', E_USER_WARNING); |
|
70 | +if ($tpl->getUid() != "' . $tpl->getUid().'") { ob_end_clean(); return false; }'; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | return $out; |
@@ -38,6 +38,6 @@ |
||
38 | 38 | */ |
39 | 39 | public static function compile(Compiler $compiler, $value) |
40 | 40 | { |
41 | - return 'nl2br((string) ' . $value . ')'; |
|
41 | + return 'nl2br((string) '.$value.')'; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | \ No newline at end of file |
@@ -121,8 +121,8 @@ discard block |
||
121 | 121 | $equation); |
122 | 122 | |
123 | 123 | $delim = $equation[0]; |
124 | - $open = $delim . '.'; |
|
125 | - $close = '.' . $delim; |
|
124 | + $open = $delim.'.'; |
|
125 | + $close = '.'.$delim; |
|
126 | 126 | $equation = substr($equation, 1, - 1); |
127 | 127 | $out = ''; |
128 | 128 | $ptr = 1; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $out .= $substr; |
140 | 140 | $equation = substr($equation, $ptr); |
141 | 141 | $ptr = 0; |
142 | - ++ $allowcomma; |
|
142 | + ++$allowcomma; |
|
143 | 143 | if ($allowcomma === 1) { |
144 | 144 | $allowed[] = ','; |
145 | 145 | } |
@@ -150,17 +150,17 @@ discard block |
||
150 | 150 | $ptr = 0; |
151 | 151 | } elseif ($substr === $open) { |
152 | 152 | // pre-replaced variable |
153 | - preg_match('#.*\((?:[^()]*?|(?R))\)' . str_replace('.', '\\.', $close) . '#', substr($equation, 2), $m); |
|
153 | + preg_match('#.*\((?:[^()]*?|(?R))\)'.str_replace('.', '\\.', $close).'#', substr($equation, 2), $m); |
|
154 | 154 | if (empty($m)) { |
155 | - preg_match('#.*?' . str_replace('.', '\\.', $close) . '#', substr($equation, 2), $m); |
|
155 | + preg_match('#.*?'.str_replace('.', '\\.', $close).'#', substr($equation, 2), $m); |
|
156 | 156 | } |
157 | 157 | $out .= substr($m[0], 0, - 2); |
158 | - $equation = substr($equation, strlen($m[0]) + 2); |
|
158 | + $equation = substr($equation, strlen($m[0])+2); |
|
159 | 159 | $ptr = 0; |
160 | 160 | } elseif ($substr === '(') { |
161 | 161 | // opening parenthesis |
162 | 162 | if ($allowcomma > 0) { |
163 | - ++ $allowcomma; |
|
163 | + ++$allowcomma; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | $out .= $substr; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } elseif ($substr === ')') { |
170 | 170 | // closing parenthesis |
171 | 171 | if ($allowcomma > 0) { |
172 | - -- $allowcomma; |
|
172 | + --$allowcomma; |
|
173 | 173 | if ($allowcomma === 0) { |
174 | 174 | array_pop($allowed); |
175 | 175 | } |
@@ -181,19 +181,19 @@ discard block |
||
181 | 181 | } elseif ($ptr >= strlen($equation)) { |
182 | 182 | // parse error if we've consumed the entire equation without finding anything valid |
183 | 183 | throw new CompilationException($compiler, |
184 | - 'Math : Syntax error or variable undefined in equation ' . $equationSrc . ' at ' . $substr); |
|
184 | + 'Math : Syntax error or variable undefined in equation '.$equationSrc.' at '.$substr); |
|
185 | 185 | } else { |
186 | 186 | // nothing special, advance |
187 | - ++ $ptr; |
|
187 | + ++$ptr; |
|
188 | 188 | } |
189 | 189 | } |
190 | 190 | if ($format !== '\'\'') { |
191 | - $out = 'sprintf(' . $format . ', ' . $out . ')'; |
|
191 | + $out = 'sprintf('.$format.', '.$out.')'; |
|
192 | 192 | } |
193 | 193 | if ($assign !== '\'\'') { |
194 | - return '($this->assignInScope(' . $out . ', ' . $assign . '))'; |
|
194 | + return '($this->assignInScope('.$out.', '.$assign.'))'; |
|
195 | 195 | } |
196 | 196 | |
197 | - return '(' . $out . ')'; |
|
197 | + return '('.$out.')'; |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | \ No newline at end of file |
@@ -46,11 +46,11 @@ |
||
46 | 46 | $out = array(); |
47 | 47 | foreach ($rest as $key => $value) { |
48 | 48 | if (!is_numeric($key) && !strstr($key, '$this->scope')) { |
49 | - $key = "'" . $key . "'"; |
|
49 | + $key = "'".$key."'"; |
|
50 | 50 | } |
51 | - $out[] = $key . '=>' . $value; |
|
51 | + $out[] = $key.'=>'.$value; |
|
52 | 52 | } |
53 | 53 | |
54 | - return 'array(' . implode(', ', $out) . ')'; |
|
54 | + return 'array('.implode(', ', $out).')'; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -383,8 +383,8 @@ discard block |
||
383 | 383 | } |
384 | 384 | |
385 | 385 | if ($doCache === true) { |
386 | - $out = preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '<?php /*' . $dynamicId . '*/ echo \'$1\'; ?>', $out); |
|
387 | - if (!class_exists(self::NAMESPACE_PLUGINS_BLOCKS . 'PluginDynamic')) { |
|
386 | + $out = preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '<?php /*'.$dynamicId.'*/ echo \'$1\'; ?>', $out); |
|
387 | + if (!class_exists(self::NAMESPACE_PLUGINS_BLOCKS.'PluginDynamic')) { |
|
388 | 388 | $this->getLoader()->loadPlugin('PluginDynamic'); |
389 | 389 | } |
390 | 390 | $out = PluginDynamic::unescape($out, $dynamicId, $compiledTemplate); |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | public function addFilter($callback, $autoload = false) |
586 | 586 | { |
587 | 587 | if ($autoload) { |
588 | - $class = self::NAMESPACE_PLUGINS_FILTERS . self::toCamelCase($callback); |
|
588 | + $class = self::NAMESPACE_PLUGINS_FILTERS.self::toCamelCase($callback); |
|
589 | 589 | if (!class_exists($class) && !function_exists($class)) { |
590 | 590 | try { |
591 | 591 | $this->getLoader()->loadPlugin($callback); |
@@ -593,12 +593,12 @@ discard block |
||
593 | 593 | catch (Exception $e) { |
594 | 594 | if (strstr($callback, self::NAMESPACE_PLUGINS_FILTERS)) { |
595 | 595 | throw new Exception( |
596 | - 'Wrong filter name : ' . $callback . ', the "Filter" prefix should |
|
597 | - not be used, please only use "' . str_replace('Filter', '', $callback) . '"' |
|
596 | + 'Wrong filter name : '.$callback.', the "Filter" prefix should |
|
597 | + not be used, please only use "' . str_replace('Filter', '', $callback).'"' |
|
598 | 598 | ); |
599 | 599 | } else { |
600 | 600 | throw new Exception( |
601 | - 'Wrong filter name : ' . $callback . ', when using autoload the filter must |
|
601 | + 'Wrong filter name : '.$callback.', when using autoload the filter must |
|
602 | 602 | be in one of your plugin dir as "name.php" containig a class or function named |
603 | 603 | "Filter<name>"' |
604 | 604 | ); |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | $callback = $class; |
613 | 613 | } else { |
614 | 614 | throw new Exception( |
615 | - 'Wrong filter name : ' . $callback . ', when using autoload the filter must be in |
|
615 | + 'Wrong filter name : '.$callback.', when using autoload the filter must be in |
|
616 | 616 | one of your plugin dir as "name.php" containig a class or function named "Filter<name>"' |
617 | 617 | ); |
618 | 618 | } |
@@ -632,14 +632,14 @@ discard block |
||
632 | 632 | */ |
633 | 633 | public function removeFilter($callback) |
634 | 634 | { |
635 | - if (($index = array_search(self::NAMESPACE_PLUGINS_FILTERS. 'Filter' . self::toCamelCase($callback), $this->filters, |
|
635 | + if (($index = array_search(self::NAMESPACE_PLUGINS_FILTERS.'Filter'.self::toCamelCase($callback), $this->filters, |
|
636 | 636 | true)) !== |
637 | 637 | false) { |
638 | 638 | unset($this->filters[$index]); |
639 | 639 | } elseif (($index = array_search($callback, $this->filters, true)) !== false) { |
640 | 640 | unset($this->filters[$index]); |
641 | 641 | } else { |
642 | - $class = self::NAMESPACE_PLUGINS_FILTERS . 'Filter' . $callback; |
|
642 | + $class = self::NAMESPACE_PLUGINS_FILTERS.'Filter'.$callback; |
|
643 | 643 | foreach ($this->filters as $index => $filter) { |
644 | 644 | if (is_array($filter) && $filter[0] instanceof $class) { |
645 | 645 | unset($this->filters[$index]); |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | public function getCacheDir() |
763 | 763 | { |
764 | 764 | if ($this->cacheDir === null) { |
765 | - $this->setCacheDir(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR); |
|
765 | + $this->setCacheDir(dirname(__DIR__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR); |
|
766 | 766 | } |
767 | 767 | |
768 | 768 | return $this->cacheDir; |
@@ -778,9 +778,9 @@ discard block |
||
778 | 778 | */ |
779 | 779 | public function setCacheDir($dir) |
780 | 780 | { |
781 | - $this->cacheDir = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR; |
|
781 | + $this->cacheDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; |
|
782 | 782 | if (is_writable($this->cacheDir) === false) { |
783 | - throw new Exception('The cache directory must be writable, chmod "' . $this->cacheDir . '" to make it writable'); |
|
783 | + throw new Exception('The cache directory must be writable, chmod "'.$this->cacheDir.'" to make it writable'); |
|
784 | 784 | } |
785 | 785 | } |
786 | 786 | |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | public function getCompileDir() |
793 | 793 | { |
794 | 794 | if ($this->compileDir === null) { |
795 | - $this->setCompileDir(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'compiled' . DIRECTORY_SEPARATOR); |
|
795 | + $this->setCompileDir(dirname(__DIR__).DIRECTORY_SEPARATOR.'compiled'.DIRECTORY_SEPARATOR); |
|
796 | 796 | } |
797 | 797 | |
798 | 798 | return $this->compileDir; |
@@ -808,9 +808,9 @@ discard block |
||
808 | 808 | */ |
809 | 809 | public function setCompileDir($dir) |
810 | 810 | { |
811 | - $this->compileDir = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR; |
|
811 | + $this->compileDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; |
|
812 | 812 | if (is_writable($this->compileDir) === false) { |
813 | - throw new Exception('The compile directory must be writable, chmod "' . $this->compileDir . '" to make it writable'); |
|
813 | + throw new Exception('The compile directory must be writable, chmod "'.$this->compileDir.'" to make it writable'); |
|
814 | 814 | } |
815 | 815 | } |
816 | 816 | |
@@ -834,9 +834,9 @@ discard block |
||
834 | 834 | */ |
835 | 835 | public function setTemplateDir($dir) |
836 | 836 | { |
837 | - $tmpDir = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR; |
|
837 | + $tmpDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; |
|
838 | 838 | if (is_dir($tmpDir) === false) { |
839 | - throw new Exception('The template directory: "' . $tmpDir . '" does not exists, create the directory or specify an other location !'); |
|
839 | + throw new Exception('The template directory: "'.$tmpDir.'" does not exists, create the directory or specify an other location !'); |
|
840 | 840 | } |
841 | 841 | $this->templateDir[] = $tmpDir; |
842 | 842 | } |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | */ |
861 | 861 | public function setCacheTime($seconds) |
862 | 862 | { |
863 | - $this->cacheTime = (int)$seconds; |
|
863 | + $this->cacheTime = (int) $seconds; |
|
864 | 864 | } |
865 | 865 | |
866 | 866 | /** |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | */ |
885 | 885 | public function setCharset($charset) |
886 | 886 | { |
887 | - $this->charset = strtolower((string)$charset); |
|
887 | + $this->charset = strtolower((string) $charset); |
|
888 | 888 | } |
889 | 889 | |
890 | 890 | /** |
@@ -1021,11 +1021,11 @@ discard block |
||
1021 | 1021 | public function clearCache($olderThan = - 1) |
1022 | 1022 | { |
1023 | 1023 | $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->getCacheDir()), \RecursiveIteratorIterator::SELF_FIRST); |
1024 | - $expired = time() - $olderThan; |
|
1024 | + $expired = time()-$olderThan; |
|
1025 | 1025 | $count = 0; |
1026 | 1026 | foreach ($iterator as $file) { |
1027 | 1027 | if ($file->isFile() && $file->getCTime() < $expired) { |
1028 | - $count += unlink((string)$file) ? 1 : 0; |
|
1028 | + $count += unlink((string) $file) ? 1 : 0; |
|
1029 | 1029 | } |
1030 | 1030 | } |
1031 | 1031 | |
@@ -1058,7 +1058,7 @@ discard block |
||
1058 | 1058 | return $class::templateFactory($this, $resourceId, $cacheTime, $cacheId, $compileId, $parentTemplate); |
1059 | 1059 | } |
1060 | 1060 | |
1061 | - throw new Exception('Unknown resource type : ' . $resourceName); |
|
1061 | + throw new Exception('Unknown resource type : '.$resourceName); |
|
1062 | 1062 | } |
1063 | 1063 | |
1064 | 1064 | /** |
@@ -1158,7 +1158,7 @@ discard block |
||
1158 | 1158 | if (!($tplIdentifier = $this->template->getResourceIdentifier())) { |
1159 | 1159 | $tplIdentifier = $this->template->getResourceName(); |
1160 | 1160 | } |
1161 | - trigger_error('Dwoo error (in ' . $tplIdentifier . ') : ' . $message, $level); |
|
1161 | + trigger_error('Dwoo error (in '.$tplIdentifier.') : '.$message, $level); |
|
1162 | 1162 | } |
1163 | 1163 | |
1164 | 1164 | /** |
@@ -1174,7 +1174,7 @@ discard block |
||
1174 | 1174 | if (isset($this->plugins[$blockName])) { |
1175 | 1175 | $class = $this->plugins[$blockName]['class']; |
1176 | 1176 | } else { |
1177 | - $class = self::NAMESPACE_PLUGINS_BLOCKS . 'Plugin' . self::toCamelCase($blockName); |
|
1177 | + $class = self::NAMESPACE_PLUGINS_BLOCKS.'Plugin'.self::toCamelCase($blockName); |
|
1178 | 1178 | } |
1179 | 1179 | |
1180 | 1180 | if ($this->curBlock !== null) { |
@@ -1237,7 +1237,7 @@ discard block |
||
1237 | 1237 | { |
1238 | 1238 | $index = array_search($block, $this->stack, true); |
1239 | 1239 | if ($index !== false && $index > 0) { |
1240 | - return $this->stack[$index - 1]; |
|
1240 | + return $this->stack[$index-1]; |
|
1241 | 1241 | } |
1242 | 1242 | |
1243 | 1243 | return false; |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | if (isset($this->plugins[$type])) { |
1256 | 1256 | $type = $this->plugins[$type]['class']; |
1257 | 1257 | } else { |
1258 | - $type = self::NAMESPACE_PLUGINS_BLOCKS . 'Plugin_' . str_replace(self::NAMESPACE_PLUGINS_BLOCKS.'Plugin', |
|
1258 | + $type = self::NAMESPACE_PLUGINS_BLOCKS.'Plugin_'.str_replace(self::NAMESPACE_PLUGINS_BLOCKS.'Plugin', |
|
1259 | 1259 | '', $type); |
1260 | 1260 | } |
1261 | 1261 | |
@@ -1333,7 +1333,7 @@ discard block |
||
1333 | 1333 | |
1334 | 1334 | if (is_string($callback) === false) { |
1335 | 1335 | while (($i = array_shift($keys)) !== null) { |
1336 | - $out[] = call_user_func_array($callback, array(1 => $items[$i]) + $params); |
|
1336 | + $out[] = call_user_func_array($callback, array(1 => $items[$i])+$params); |
|
1337 | 1337 | } |
1338 | 1338 | } elseif ($cnt === 1) { |
1339 | 1339 | while (($i = array_shift($keys)) !== null) { |
@@ -1349,7 +1349,7 @@ discard block |
||
1349 | 1349 | } |
1350 | 1350 | } else { |
1351 | 1351 | while (($i = array_shift($keys)) !== null) { |
1352 | - $out[] = call_user_func_array($callback, array(1 => $items[$i]) + $params); |
|
1352 | + $out[] = call_user_func_array($callback, array(1 => $items[$i])+$params); |
|
1353 | 1353 | } |
1354 | 1354 | } |
1355 | 1355 | } else { |
@@ -1358,7 +1358,7 @@ discard block |
||
1358 | 1358 | |
1359 | 1359 | if (is_string($callback) === false) { |
1360 | 1360 | while (($i = array_shift($keys)) !== null) { |
1361 | - $out[] = call_user_func_array($callback, array($items[$i]) + $params); |
|
1361 | + $out[] = call_user_func_array($callback, array($items[$i])+$params); |
|
1362 | 1362 | } |
1363 | 1363 | } elseif ($cnt === 1) { |
1364 | 1364 | while (($i = array_shift($keys)) !== null) { |
@@ -1378,7 +1378,7 @@ discard block |
||
1378 | 1378 | } |
1379 | 1379 | } else { |
1380 | 1380 | while (($i = array_shift($keys)) !== null) { |
1381 | - $out[] = call_user_func_array($callback, array($items[$i]) + $params); |
|
1381 | + $out[] = call_user_func_array($callback, array($items[$i])+$params); |
|
1382 | 1382 | } |
1383 | 1383 | } |
1384 | 1384 | } |
@@ -1448,7 +1448,7 @@ discard block |
||
1448 | 1448 | $tree = $this->scopeTree; |
1449 | 1449 | $cur = $this->data; |
1450 | 1450 | |
1451 | - while ($parentLevels -- !== 0) { |
|
1451 | + while ($parentLevels-- !== 0) { |
|
1452 | 1452 | array_pop($tree); |
1453 | 1453 | } |
1454 | 1454 | |
@@ -1486,7 +1486,7 @@ discard block |
||
1486 | 1486 | } elseif ($varstr === '__' || $varstr === '_root') { |
1487 | 1487 | return $this->data; |
1488 | 1488 | } elseif ($varstr === '_' || $varstr === '_parent') { |
1489 | - $varstr = '.' . $varstr; |
|
1489 | + $varstr = '.'.$varstr; |
|
1490 | 1490 | $tree = $this->scopeTree; |
1491 | 1491 | $cur = $this->data; |
1492 | 1492 | array_pop($tree); |
@@ -1512,7 +1512,7 @@ discard block |
||
1512 | 1512 | } |
1513 | 1513 | |
1514 | 1514 | if (substr($varstr, 0, 1) === '.') { |
1515 | - $varstr = 'dwoo' . $varstr; |
|
1515 | + $varstr = 'dwoo'.$varstr; |
|
1516 | 1516 | } |
1517 | 1517 | |
1518 | 1518 | preg_match_all('#(\[|->|\.)?((?:[^.[\]-]|-(?!>))+)\]?#i', $varstr, $m); |
@@ -1619,7 +1619,7 @@ discard block |
||
1619 | 1619 | public function assignInScope($value, $scope) |
1620 | 1620 | { |
1621 | 1621 | if (!is_string($scope)) { |
1622 | - $this->triggerError('Assignments must be done into strings, (' . gettype($scope) . ') ' . var_export($scope, true) . ' given', E_USER_ERROR); |
|
1622 | + $this->triggerError('Assignments must be done into strings, ('.gettype($scope).') '.var_export($scope, true).' given', E_USER_ERROR); |
|
1623 | 1623 | } |
1624 | 1624 | if (strstr($scope, '.') === false && strstr($scope, '->') === false) { |
1625 | 1625 | $this->scope[$scope] = $value; |
@@ -1770,7 +1770,7 @@ discard block |
||
1770 | 1770 | { |
1771 | 1771 | $proxy = $this->getPluginProxy(); |
1772 | 1772 | if (!$proxy) { |
1773 | - throw new Exception('Call to undefined method ' . __CLASS__ . '::' . $method . '()'); |
|
1773 | + throw new Exception('Call to undefined method '.__CLASS__.'::'.$method.'()'); |
|
1774 | 1774 | } |
1775 | 1775 | |
1776 | 1776 | return call_user_func_array($proxy->getCallback($method), $args); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | { |
98 | 98 | if (is_array($name)) { |
99 | 99 | reset($name); |
100 | - foreach ($name as $k => $v){ |
|
100 | + foreach ($name as $k => $v) { |
|
101 | 101 | $this->data[$k] = $v; |
102 | 102 | } |
103 | 103 | } else { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } |
147 | 147 | |
148 | 148 | if ($merge === true && is_array($val)) { |
149 | - $this->data[$key] = $val + $this->data[$key]; |
|
149 | + $this->data[$key] = $val+$this->data[$key]; |
|
150 | 150 | } else { |
151 | 151 | $this->data[$key][] = $val; |
152 | 152 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | if ($merge === true && is_array($val)) { |
162 | - $this->data[$name] = $val + $this->data[$name]; |
|
162 | + $this->data[$name] = $val+$this->data[$name]; |
|
163 | 163 | } else { |
164 | 164 | $this->data[$name][] = $val; |
165 | 165 | } |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | if (isset($this->data[$name])) { |
259 | 259 | return $this->data[$name]; |
260 | 260 | } else { |
261 | - throw new Exception('Tried to read a value that was not assigned yet : "' . $name . '"'); |
|
261 | + throw new Exception('Tried to read a value that was not assigned yet : "'.$name.'"'); |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | } |