Completed
Pull Request — master (#87)
by David
14:35 queued 07:46
created
lib/Dwoo/Plugins/Filters/PluginHtmlFormat.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         // textarea, pre, code tags and comments are to be left alone to avoid any non-wanted whitespace inside them so it just outputs them as they were
80 80
         if (substr($input[1], 0, 9) == '<textarea' || substr($input[1], 0, 4) == '<pre' || substr($input[1], 0, 5) == '<code' || substr($input[1], 0, 4) == '<!--' || substr($input[1], 0, 9) == '<![CDATA[') {
81
-            return $input[1] . $input[3];
81
+            return $input[1].$input[3];
82 82
         }
83 83
         // closing textarea, code and pre tags and self-closed tags (i.e. <br />) are printed as singleTags because we didn't use openTag for the formers and the latter is a single tag
84 84
         if (substr($input[1], 0, 10) == '</textarea' || substr($input[1], 0, 5) == '</pre' || substr($input[1], 0, 6) == '</code' || substr($input[1], - 2) == '/>') {
@@ -104,20 +104,20 @@  discard block
 block discarded – undo
104 104
      */
105 105
     protected static function openTag($tag, $add, $whitespace)
106 106
     {
107
-        $tabs = str_pad('', self::$tabCount ++, "\t");
107
+        $tabs = str_pad('', self::$tabCount++, "\t");
108 108
 
109 109
         if (preg_match('#^<(a|label|option|textarea|h1|h2|h3|h4|h5|h6|strong|b|em|i|abbr|acronym|cite|span|sub|sup|u|s|title)(?: [^>]*|)>#', $tag)) {
110 110
             // if it's one of those tag it's inline so it does not require a leading line break
111
-            $result = $tag . $whitespace . str_replace("\n", "\n" . $tabs, $add);
111
+            $result = $tag.$whitespace.str_replace("\n", "\n".$tabs, $add);
112 112
         } elseif (substr($tag, 0, 9) == '<!DOCTYPE') {
113 113
             // it's the doctype declaration so no line break here either
114
-            $result = $tabs . $tag;
114
+            $result = $tabs.$tag;
115 115
         } else {
116 116
             // normal block tag
117
-            $result = "\n" . $tabs . $tag;
117
+            $result = "\n".$tabs.$tag;
118 118
 
119 119
             if (!empty($add)) {
120
-                $result .= "\n" . $tabs . "\t" . str_replace("\n", "\n\t" . $tabs, $add);
120
+                $result .= "\n".$tabs."\t".str_replace("\n", "\n\t".$tabs, $add);
121 121
             }
122 122
         }
123 123
 
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 
142 142
         // if it's one of those tag it's inline so it does not require a leading line break
143 143
         if (preg_match('#^</(a|label|option|textarea|h1|h2|h3|h4|h5|h6|strong|b|em|i|abbr|acronym|cite|span|sub|sup|u|s|title)>#', $tag)) {
144
-            $result = $tag . $whitespace . str_replace("\n", "\n" . $tabs, $add);
144
+            $result = $tag.$whitespace.str_replace("\n", "\n".$tabs, $add);
145 145
         } else {
146
-            $result = "\n" . $tabs . $tag;
146
+            $result = "\n".$tabs.$tag;
147 147
 
148 148
             if (!empty($add)) {
149
-                $result .= "\n" . $tabs . "\t" . str_replace("\n", "\n\t" . $tabs, $add);
149
+                $result .= "\n".$tabs."\t".str_replace("\n", "\n\t".$tabs, $add);
150 150
             }
151 151
         }
152 152
 
@@ -170,16 +170,16 @@  discard block
 block discarded – undo
170 170
         // if it's img, br it's inline so it does not require a leading line break
171 171
         // if it's a closing textarea, code or pre tag, it does not require a leading line break either or it creates whitespace at the end of those blocks
172 172
         if (preg_match('#^<(img|br|/textarea|/pre|/code)(?: [^>]*|)>#', $tag)) {
173
-            $result = $tag . $whitespace;
173
+            $result = $tag.$whitespace;
174 174
 
175 175
             if (!empty($add)) {
176
-                $result .= str_replace("\n", "\n" . $tabs, $add);
176
+                $result .= str_replace("\n", "\n".$tabs, $add);
177 177
             }
178 178
         } else {
179
-            $result = "\n" . $tabs . $tag;
179
+            $result = "\n".$tabs.$tag;
180 180
 
181 181
             if (!empty($add)) {
182
-                $result .= "\n" . $tabs . str_replace("\n", "\n" . $tabs, $add);
182
+                $result .= "\n".$tabs.str_replace("\n", "\n".$tabs, $add);
183 183
             }
184 184
         }
185 185
 
Please login to merge, or discard this patch.
lib/Dwoo/Security/Policy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@
 block discarded – undo
290 290
                 return call_user_func_array(array($obj, $method), $args);
291 291
             }
292 292
         }
293
-        $dwoo->triggerError('The current security policy prevents you from calling ' . get_class($obj) . '::' . $method . '()');
293
+        $dwoo->triggerError('The current security policy prevents you from calling '.get_class($obj).'::'.$method.'()');
294 294
 
295 295
         return null;
296 296
     }
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginIsset.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, $var)
40 40
     {
41
-        return '(' . $var . ' !== null)';
41
+        return '('.$var.' !== null)';
42 42
     }
43 43
 }
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginDateFormat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
                 '%t',
68 68
                 '%T'
69 69
             );
70
-            $_win_to   = array(
70
+            $_win_to = array(
71 71
                 '%m/%d/%y',
72 72
                 '%b',
73 73
                 "\n",
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginReturn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@
 block discarded – undo
46 46
     {
47 47
         $out = array();
48 48
         foreach ($rest as $var => $val) {
49
-            $out[] = '$this->setReturnValue(' . var_export($var, true) . ', ' . $val . ')';
49
+            $out[] = '$this->setReturnValue('.var_export($var, true).', '.$val.')';
50 50
         }
51 51
 
52
-        return '(' . implode('.', $out) . ')';
52
+        return '('.implode('.', $out).')';
53 53
     }
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginCountWords.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,6 +32,6 @@
 block discarded – undo
32 32
 {
33 33
     public static function compile(Compiler $compiler, $value)
34 34
     {
35
-        return 'preg_match_all(strcasecmp($this->charset, \'utf-8\')===0 ? \'#[\w\pL]+#u\' : \'#\w+#\', ' . $value . ', $tmp)';
35
+        return 'preg_match_all(strcasecmp($this->charset, \'utf-8\')===0 ? \'#[\w\pL]+#u\' : \'#\w+#\', '.$value.', $tmp)';
36 36
     }
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginReverse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
         if (is_array($value)) {
41 41
             return array_reverse($value, $preserve_keys);
42 42
         } elseif (($charset = $this->core->getCharset()) === 'iso-8859-1') {
43
-            return strrev((string)$value);
43
+            return strrev((string) $value);
44 44
         }
45 45
 
46 46
         $strlen = mb_strlen($value);
47 47
         $out    = '';
48
-        while ($strlen --) {
48
+        while ($strlen--) {
49 49
             $out .= mb_substr($value, $strlen, 1, $charset);
50 50
         }
51 51
 
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginSpacify.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
      */
41 41
     public static function compile(Compiler $compiler, $value, $space_char = ' ')
42 42
     {
43
-        return 'implode(' . $space_char . ', str_split(' . $value . ', 1))';
43
+        return 'implode('.$space_char.', str_split('.$value.', 1))';
44 44
     }
45 45
 }
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginUpper.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 'mb_strtoupper((string) ' . $value . ', $this->charset)';
41
+        return 'mb_strtoupper((string) '.$value.', $this->charset)';
42 42
     }
43 43
 }
44 44
\ No newline at end of file
Please login to merge, or discard this patch.