Completed
Push — master ( a400a4...020752 )
by David
07:41 queued 04:43
created
lib/Dwoo/Plugins/Functions/PluginCat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,6 +39,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginCountCharacters.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginExtendsCheck.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,29 +45,29 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginNl2br.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,6 +38,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginMath.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Helpers/PluginArray.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
lib/Dwoo/Core.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -383,8 +383,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
lib/Dwoo/Data.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginDump.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         $out .= $this->export($var, $scope);
72 72
 
73
-        return $out . '</div></div>';
73
+        return $out.'</div></div>';
74 74
     }
75 75
 
76 76
     /**
@@ -84,16 +84,16 @@  discard block
 block discarded – undo
84 84
         $out = '';
85 85
         foreach ($var as $i => $v) {
86 86
             if (is_array($v) || (is_object($v) && $v instanceof Iterator)) {
87
-                $out .= $i . ' (' . (is_array($v) ? 'array' : 'object: ' . get_class($v)) . ')';
87
+                $out .= $i.' ('.(is_array($v) ? 'array' : 'object: '.get_class($v)).')';
88 88
                 if ($v === $scope) {
89
-                    $out .= ' (current scope):<div style="background:#ccc;padding-left:20px;">' . $this->export($v, $scope) . '</div>';
89
+                    $out .= ' (current scope):<div style="background:#ccc;padding-left:20px;">'.$this->export($v, $scope).'</div>';
90 90
                 } else {
91
-                    $out .= ':<div style="padding-left:20px;">' . $this->export($v, $scope) . '</div>';
91
+                    $out .= ':<div style="padding-left:20px;">'.$this->export($v, $scope).'</div>';
92 92
                 }
93 93
             } elseif (is_object($v)) {
94
-                $out .= $this->exportObj($i . ' (object: ' . get_class($v) . '):', $v);
94
+                $out .= $this->exportObj($i.' (object: '.get_class($v).'):', $v);
95 95
             } else {
96
-                $out .= $this->exportVar($i . ' = ', $v);
96
+                $out .= $this->exportVar($i.' = ', $v);
97 97
             }
98 98
         }
99 99
 
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
     protected function exportVar($i, $v)
110 110
     {
111 111
         if (is_string($v) || is_bool($v) || is_numeric($v)) {
112
-            return $i . htmlentities(var_export($v, true)) . '<br />';
112
+            return $i.htmlentities(var_export($v, true)).'<br />';
113 113
         } elseif (is_null($v)) {
114
-            return $i . 'null<br />';
114
+            return $i.'null<br />';
115 115
         } elseif (is_resource($v)) {
116
-            return $i . 'resource(' . get_resource_type($v) . ')<br />';
116
+            return $i.'resource('.get_resource_type($v).')<br />';
117 117
         } else {
118
-            return $i . htmlentities(var_export($v, true)) . '<br />';
118
+            return $i.htmlentities(var_export($v, true)).'<br />';
119 119
         }
120 120
     }
121 121
 
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
     protected function exportObj($i, $obj)
129 129
     {
130 130
         if (array_search($obj, $this->outputObjects, true) !== false) {
131
-            return $i . ' [recursion, skipped]<br />';
131
+            return $i.' [recursion, skipped]<br />';
132 132
         }
133 133
 
134 134
         $this->outputObjects[] = $obj;
135 135
 
136
-        $list = (array)$obj;
136
+        $list = (array) $obj;
137 137
 
138
-        $protectedLength = strlen(get_class($obj)) + 2;
138
+        $protectedLength = strlen(get_class($obj))+2;
139 139
 
140 140
         $out = array();
141 141
 
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 
154 154
                 $params = array();
155 155
                 foreach ($method->getParameters() as $param) {
156
-                    $params[] = ($param->isPassedByReference() ? '&' : '') . '$' . $param->getName() . ($param->isOptional() ? ' = ' . var_export($param->getDefaultValue(), true) : '');
156
+                    $params[] = ($param->isPassedByReference() ? '&' : '').'$'.$param->getName().($param->isOptional() ? ' = '.var_export($param->getDefaultValue(), true) : '');
157 157
                 }
158 158
 
159
-                $out['method'] .= '(method) ' . $method->getName() . '(' . implode(', ', $params) . ')<br />';
159
+                $out['method'] .= '(method) '.$method->getName().'('.implode(', ', $params).')<br />';
160 160
             }
161 161
         }
162 162
 
@@ -175,19 +175,19 @@  discard block
 block discarded – undo
175 175
                 $out[$key] = '';
176 176
             }
177 177
 
178
-            $out[$key] .= '(' . $key . ') ';
178
+            $out[$key] .= '('.$key.') ';
179 179
 
180 180
             if (is_array($attributeValue)) {
181
-                $out[$key] .= $attributeName . ' (array):<br />
182
-							<div style="padding-left:20px;">' . $this->export($attributeValue, false) . '</div>';
181
+                $out[$key] .= $attributeName.' (array):<br />
182
+							<div style="padding-left:20px;">' . $this->export($attributeValue, false).'</div>';
183 183
             } elseif (is_object($attributeValue)) {
184
-                $out[$key] .= $this->exportObj($attributeName . ' (object: ' . get_class($attributeValue) . '):', $attributeValue);
184
+                $out[$key] .= $this->exportObj($attributeName.' (object: '.get_class($attributeValue).'):', $attributeValue);
185 185
             } else {
186
-                $out[$key] .= $this->exportVar($attributeName . ' = ', $attributeValue);
186
+                $out[$key] .= $this->exportVar($attributeName.' = ', $attributeValue);
187 187
             }
188 188
         }
189 189
 
190
-        $return = $i . '<br /><div style="padding-left:20px;">';
190
+        $return = $i.'<br /><div style="padding-left:20px;">';
191 191
 
192 192
         if (!empty($out['method'])) {
193 193
             $return .= $out['method'];
@@ -205,6 +205,6 @@  discard block
 block discarded – undo
205 205
             $return .= $out['private'];
206 206
         }
207 207
 
208
-        return $return . '</div>';
208
+        return $return.'</div>';
209 209
     }
210 210
 }
Please login to merge, or discard this patch.