Completed
Push — master ( bf2930...494091 )
by David
07:08 queued 03:26
created
lib/Dwoo/Core.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -549,8 +549,7 @@
 block discarded – undo
549 549
             if (!class_exists($class) && !function_exists($class)) {
550 550
                 try {
551 551
                     $this->getLoader()->loadPlugin($callback);
552
-                }
553
-                catch (Exception $e) {
552
+                } catch (Exception $e) {
554 553
                     if (strstr($callback, self::NAMESPACE_PLUGINS_FILTERS)) {
555 554
                         throw new Exception(
556 555
                             'Wrong filter name : ' . $callback . ', the "Dwoo_Filter_" prefix should 
Please login to merge, or discard this patch.
lib/Dwoo/Compiler.php 2 patches
Switch Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -769,13 +769,13 @@  discard block
 block discarded – undo
769 769
                         $search = array('{<\?.*?\?>}', '{<%.*?%>}');
770 770
                     }
771 771
                     switch ($this->securityPolicy->getPhpHandling()) {
772
-                        case SecurityPolicy::PHP_ALLOW:
773
-                            break;
774
-                        case SecurityPolicy::PHP_ENCODE:
775
-                            $tpl = preg_replace_callback($search, array($this, 'phpTagEncodingHelper'), $tpl);
776
-                            break;
777
-                        case SecurityPolicy::PHP_REMOVE:
778
-                            $tpl = preg_replace($search, '', $tpl);
772
+                    case SecurityPolicy::PHP_ALLOW:
773
+                        break;
774
+                    case SecurityPolicy::PHP_ENCODE:
775
+                        $tpl = preg_replace_callback($search, array($this, 'phpTagEncodingHelper'), $tpl);
776
+                        break;
777
+                    case SecurityPolicy::PHP_REMOVE:
778
+                        $tpl = preg_replace($search, '', $tpl);
779 779
                     }
780 780
                 }
781 781
             }
@@ -875,42 +875,42 @@  discard block
 block discarded – undo
875 875
             }
876 876
 
877 877
             switch ($type) {
878
-                case Core::BLOCK_PLUGIN:
879
-                case Core::CLASS_PLUGIN:
880
-                    if (class_exists('Plugin' . $plugin) !== false) {
881
-                        $output .= "if (class_exists('" . "Plugin" . $plugin . "')===false)".
882
-                        "\n\t\$this->getLoader()->loadPlugin('Plugin$plugin');\n";
883
-                    } else {
884
-                        $output .= "if (class_exists('" . Core::NAMESPACE_PLUGINS_BLOCKS . "Plugin" . $plugin . "')===false)".
885
-                        "\n\t\$this->getLoader()->loadPlugin('Plugin$plugin');\n";
886
-                    }
887
-                    break;
888
-                case Core::FUNC_PLUGIN:
889
-                    if (function_exists('Plugin' . $plugin) !== false) {
890
-                        $output .= "if (function_exists('" . "Plugin" . $plugin . "')===false)".
891
-                        "\n\t\$this->getLoader()->loadPlugin('Plugin$plugin');\n";
892
-                    } else {
893
-                        $output .= "if (function_exists('" . Core::NAMESPACE_PLUGINS_FUNCTIONS . "Plugin" . $plugin . "')===false)".
894
-                        "\n\t\$this->getLoader()->loadPlugin('Plugin$plugin');\n";
895
-                    }
896
-                    break;
897
-                case Core::SMARTY_MODIFIER:
898
-                    $output .= "if (function_exists('smarty_modifier_$plugin')===false)".
899
-                    "\n\t\$this->getLoader()->loadPlugin('$plugin');\n";
900
-                    break;
901
-                case Core::SMARTY_FUNCTION:
902
-                    $output .= "if (function_exists('smarty_function_$plugin')===false)".
903
-                    "\n\t\$this->getLoader()->loadPlugin('$plugin');\n";
904
-                    break;
905
-                case Core::SMARTY_BLOCK:
906
-                    $output .= "if (function_exists('smarty_block_$plugin')===false)".
907
-                    "\n\t\$this->getLoader()->loadPlugin('$plugin');\n";
908
-                    break;
909
-                case Core::PROXY_PLUGIN:
910
-                    $output .= $this->getDwoo()->getPluginProxy()->getLoader($plugin);
911
-                    break;
912
-                default:
913
-                    throw new CompilationException($this, 'Type error for ' . $plugin . ' with type' . $type);
878
+            case Core::BLOCK_PLUGIN:
879
+            case Core::CLASS_PLUGIN:
880
+                if (class_exists('Plugin' . $plugin) !== false) {
881
+                    $output .= "if (class_exists('" . "Plugin" . $plugin . "')===false)".
882
+                    "\n\t\$this->getLoader()->loadPlugin('Plugin$plugin');\n";
883
+                } else {
884
+                    $output .= "if (class_exists('" . Core::NAMESPACE_PLUGINS_BLOCKS . "Plugin" . $plugin . "')===false)".
885
+                    "\n\t\$this->getLoader()->loadPlugin('Plugin$plugin');\n";
886
+                }
887
+                break;
888
+            case Core::FUNC_PLUGIN:
889
+                if (function_exists('Plugin' . $plugin) !== false) {
890
+                    $output .= "if (function_exists('" . "Plugin" . $plugin . "')===false)".
891
+                    "\n\t\$this->getLoader()->loadPlugin('Plugin$plugin');\n";
892
+                } else {
893
+                    $output .= "if (function_exists('" . Core::NAMESPACE_PLUGINS_FUNCTIONS . "Plugin" . $plugin . "')===false)".
894
+                    "\n\t\$this->getLoader()->loadPlugin('Plugin$plugin');\n";
895
+                }
896
+                break;
897
+            case Core::SMARTY_MODIFIER:
898
+                $output .= "if (function_exists('smarty_modifier_$plugin')===false)".
899
+                "\n\t\$this->getLoader()->loadPlugin('$plugin');\n";
900
+                break;
901
+            case Core::SMARTY_FUNCTION:
902
+                $output .= "if (function_exists('smarty_function_$plugin')===false)".
903
+                "\n\t\$this->getLoader()->loadPlugin('$plugin');\n";
904
+                break;
905
+            case Core::SMARTY_BLOCK:
906
+                $output .= "if (function_exists('smarty_block_$plugin')===false)".
907
+                "\n\t\$this->getLoader()->loadPlugin('$plugin');\n";
908
+                break;
909
+            case Core::PROXY_PLUGIN:
910
+                $output .= $this->getDwoo()->getPluginProxy()->getLoader($plugin);
911
+                break;
912
+            default:
913
+                throw new CompilationException($this, 'Type error for ' . $plugin . ' with type' . $type);
914 914
             }
915 915
         }
916 916
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -478,8 +478,7 @@  discard block
 block discarded – undo
478 478
         if (!class_exists($class) && !function_exists($class)) {
479 479
             try {
480 480
                 $this->getDwoo()->getLoader()->loadPlugin($name);
481
-            }
482
-            catch (Exception $e) {
481
+            } catch (Exception $e) {
483 482
                 throw new Exception('Processor ' . $name . ' could not be found in your plugin directories, please ensure it is in a file named ' . $name . '.php in the plugin directory');
484 483
             }
485 484
         }
@@ -1624,8 +1623,7 @@  discard block
 block discarded – undo
1624 1623
                     // load if plugin
1625 1624
                     try {
1626 1625
                         $this->getPluginType('if');
1627
-                    }
1628
-                    catch (Exception $e) {
1626
+                    } catch (Exception $e) {
1629 1627
                         throw new CompilationException($this, 'Assignments require the "if" plugin to be accessible');
1630 1628
                     }
1631 1629
 
@@ -3409,8 +3407,7 @@  discard block
 block discarded – undo
3409 3407
                     try {
3410 3408
                         $this->getDwoo()->getLoader()->loadPlugin(
3411 3409
                             'Plugin' . Core::toCamelCase($name));
3412
-                    }
3413
-                    catch (Exception $e) {
3410
+                    } catch (Exception $e) {
3414 3411
                         if (isset($phpFunc)) {
3415 3412
                             $pluginType = Core::NATIVE_PLUGIN;
3416 3413
                         } elseif (is_object($this->getDwoo()->getPluginProxy()) && $this->getDwoo()->getPluginProxy()->handles($name)) {
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginInclude.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,11 +52,9 @@
 block discarded – undo
52 52
 
53 53
     try {
54 54
         $include = $dwoo->templateFactory($resource, $identifier, $cache_time, $cache_id, $compile_id);
55
-    }
56
-    catch (SecurityException $e) {
55
+    } catch (SecurityException $e) {
57 56
         $dwoo->triggerError('Include : Security restriction : ' . $e->getMessage(), E_USER_WARNING);
58
-    }
59
-    catch (Exception $e) {
57
+    } catch (Exception $e) {
60 58
         $dwoo->triggerError('Include : ' . $e->getMessage(), E_USER_WARNING);
61 59
     }
62 60
 
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginExtends.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,11 +95,9 @@
 block discarded – undo
95 95
 
96 96
             try {
97 97
                 $parent = $compiler->getDwoo()->templateFactory($resource, $identifier, null, null, null, $curTpl);
98
-            }
99
-            catch (SecurityException $e) {
98
+            } catch (SecurityException $e) {
100 99
                 throw new CompilationException($compiler, 'Extends : Security restriction : ' . $e->getMessage());
101
-            }
102
-            catch (Exception $e) {
100
+            } catch (Exception $e) {
103 101
                 throw new CompilationException($compiler, 'Extends : ' . $e->getMessage());
104 102
             }
105 103
 
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Functions/PluginTifCompile.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@
 block discarded – undo
38 38
     if (!class_exists(Core::NAMESPACE_PLUGINS_BLOCKS . 'PluginIf')) {
39 39
         try {
40 40
             $compiler->getDwoo()->getLoader()->loadPlugin('if');
41
-        }
42
-        catch (Exception $e) {
41
+        } catch (Exception $e) {
43 42
             throw new CompilationException($compiler, 'Tif: the if plugin is required to use Tif');
44 43
         }
45 44
     }
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Blocks/PluginIf.php 1 patch
Switch Indentation   +153 added lines, -153 removed lines patch added patch discarded remove patch
@@ -70,164 +70,164 @@
 block discarded – undo
70 70
             }
71 71
             switch ($vmod) {
72 72
 
73
-                case 'and':
74
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
75
-                        $p[] = '&&';
76
-                    } else {
77
-                        $p[] = $v;
78
-                    }
79
-                    break;
80
-                case 'or':
81
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
82
-                        $p[] = '||';
83
-                    } else {
84
-                        $p[] = $v;
85
-                    }
86
-                    break;
87
-                case 'xor':
88
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
89
-                        $p[] = '^';
90
-                    } else {
91
-                        $p[] = $v;
92
-                    }
93
-                    break;
94
-                case 'eq':
95
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
96
-                        $p[] = '==';
97
-                    } else {
98
-                        $p[] = $v;
99
-                    }
100
-                    break;
101
-                case 'ne':
102
-                case 'neq':
103
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
104
-                        $p[] = '!=';
105
-                    } else {
106
-                        $p[] = $v;
107
-                    }
108
-                    break;
109
-                case 'gte':
110
-                case 'ge':
111
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
112
-                        $p[] = '>=';
113
-                    } else {
114
-                        $p[] = $v;
115
-                    }
116
-                    break;
117
-                case 'lte':
118
-                case 'le':
119
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
120
-                        $p[] = '<=';
121
-                    } else {
122
-                        $p[] = $v;
123
-                    }
124
-                    break;
125
-                case 'gt':
126
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
127
-                        $p[] = '>';
128
-                    } else {
129
-                        $p[] = $v;
130
-                    }
131
-                    break;
132
-                case 'lt':
133
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
134
-                        $p[] = '<';
135
-                    } else {
136
-                        $p[] = $v;
137
-                    }
138
-                    break;
139
-                case 'mod':
140
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
141
-                        $p[] = '%';
142
-                    } else {
143
-                        $p[] = $v;
144
-                    }
145
-                    break;
146
-                case 'not':
147
-                    if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
148
-                        $p[] = '!';
149
-                    } else {
150
-                        $p[] = $v;
151
-                    }
152
-                    break;
153
-                case '<>':
73
+            case 'and':
74
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
75
+                    $p[] = '&&';
76
+                } else {
77
+                    $p[] = $v;
78
+                }
79
+                break;
80
+            case 'or':
81
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
82
+                    $p[] = '||';
83
+                } else {
84
+                    $p[] = $v;
85
+                }
86
+                break;
87
+            case 'xor':
88
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
89
+                    $p[] = '^';
90
+                } else {
91
+                    $p[] = $v;
92
+                }
93
+                break;
94
+            case 'eq':
95
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
96
+                    $p[] = '==';
97
+                } else {
98
+                    $p[] = $v;
99
+                }
100
+                break;
101
+            case 'ne':
102
+            case 'neq':
103
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
154 104
                     $p[] = '!=';
105
+                } else {
106
+                    $p[] = $v;
107
+                }
108
+                break;
109
+            case 'gte':
110
+            case 'ge':
111
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
112
+                    $p[] = '>=';
113
+                } else {
114
+                    $p[] = $v;
115
+                }
116
+                break;
117
+            case 'lte':
118
+            case 'le':
119
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
120
+                    $p[] = '<=';
121
+                } else {
122
+                    $p[] = $v;
123
+                }
124
+                break;
125
+            case 'gt':
126
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
127
+                    $p[] = '>';
128
+                } else {
129
+                    $p[] = $v;
130
+                }
131
+                break;
132
+            case 'lt':
133
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
134
+                    $p[] = '<';
135
+                } else {
136
+                    $p[] = $v;
137
+                }
138
+                break;
139
+            case 'mod':
140
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
141
+                    $p[] = '%';
142
+                } else {
143
+                    $p[] = $v;
144
+                }
145
+                break;
146
+            case 'not':
147
+                if ($tokens[$k] === Compiler::T_UNQUOTED_STRING) {
148
+                    $p[] = '!';
149
+                } else {
150
+                    $p[] = $v;
151
+                }
152
+                break;
153
+            case '<>':
154
+                $p[] = '!=';
155
+                break;
156
+            case '==':
157
+            case '!=':
158
+            case '>=':
159
+            case '<=':
160
+            case '>':
161
+            case '<':
162
+            case '===':
163
+            case '!==':
164
+            case '%':
165
+            case '!':
166
+            case '^':
167
+                $p[] = $vmod;
168
+                break;
169
+            case 'is':
170
+                if ($tokens[$k] !== Compiler::T_UNQUOTED_STRING) {
171
+                    $p[] = $v;
155 172
                     break;
156
-                case '==':
157
-                case '!=':
158
-                case '>=':
159
-                case '<=':
160
-                case '>':
161
-                case '<':
162
-                case '===':
163
-                case '!==':
164
-                case '%':
165
-                case '!':
166
-                case '^':
167
-                    $p[] = $vmod;
173
+                }
174
+                if (isset($params[$k + 1]) && strtolower(trim($params[$k + 1], '"\'')) === 'not' && $tokens[$k + 1] === Compiler::T_UNQUOTED_STRING) {
175
+                    $negate = true;
176
+                    next($params);
177
+                } else {
178
+                    $negate = false;
179
+                }
180
+                $ptr = 1 + (int)$negate;
181
+                if ($tokens[$k + $ptr] !== Compiler::T_UNQUOTED_STRING) {
168 182
                     break;
169
-                case 'is':
170
-                    if ($tokens[$k] !== Compiler::T_UNQUOTED_STRING) {
171
-                        $p[] = $v;
172
-                        break;
173
-                    }
174
-                    if (isset($params[$k + 1]) && strtolower(trim($params[$k + 1], '"\'')) === 'not' && $tokens[$k + 1] === Compiler::T_UNQUOTED_STRING) {
175
-                        $negate = true;
176
-                        next($params);
177
-                    } else {
178
-                        $negate = false;
179
-                    }
180
-                    $ptr = 1 + (int)$negate;
181
-                    if ($tokens[$k + $ptr] !== Compiler::T_UNQUOTED_STRING) {
182
-                        break;
183
-                    }
184
-                    if (!isset($params[$k + $ptr])) {
185
-                        $params[$k + $ptr] = '';
186
-                    } else {
187
-                        $params[$k + $ptr] = trim($params[$k + $ptr], '"\'');
188
-                    }
189
-                    switch ($params[$k + $ptr]) {
183
+                }
184
+                if (!isset($params[$k + $ptr])) {
185
+                    $params[$k + $ptr] = '';
186
+                } else {
187
+                    $params[$k + $ptr] = trim($params[$k + $ptr], '"\'');
188
+                }
189
+                switch ($params[$k + $ptr]) {
190 190
 
191
-                        case 'div':
192
-                            if (isset($params[$k + $ptr + 1]) && strtolower(trim($params[$k + $ptr + 1], '"\'')) === 'by') {
193
-                                $p[] = ' % ' . $params[$k + $ptr + 2] . ' ' . ($negate ? '!' : '=') . '== 0';
194
-                                next($params);
195
-                                next($params);
196
-                                next($params);
197
-                            } else {
198
-                                throw new CompilationException($compiler, 'If : Syntax error : syntax should be "if $a is [not] div by $b", found ' . $params[$k - 1] . ' is ' . ($negate ? 'not ' : '') . 'div ' . $params[$k + $ptr + 1] . ' ' . $params[$k + $ptr + 2]);
199
-                            }
200
-                            break;
201
-                        case 'even':
202
-                            $a = array_pop($p);
203
-                            if (isset($params[$k + $ptr + 1]) && strtolower(trim($params[$k + $ptr + 1], '"\'')) === 'by') {
204
-                                $b   = $params[$k + $ptr + 2];
205
-                                $p[] = '(' . $a . ' / ' . $b . ') % 2 ' . ($negate ? '!' : '=') . '== 0';
206
-                                next($params);
207
-                                next($params);
208
-                            } else {
209
-                                $p[] = $a . ' % 2 ' . ($negate ? '!' : '=') . '== 0';
210
-                            }
211
-                            next($params);
212
-                            break;
213
-                        case 'odd':
214
-                            $a = array_pop($p);
215
-                            if (isset($params[$k + $ptr + 1]) && strtolower(trim($params[$k + $ptr + 1], '"\'')) === 'by') {
216
-                                $b   = $params[$k + $ptr + 2];
217
-                                $p[] = '(' . $a . ' / ' . $b . ') % 2 ' . ($negate ? '=' : '!') . '== 0';
218
-                                next($params);
219
-                                next($params);
220
-                            } else {
221
-                                $p[] = $a . ' % 2 ' . ($negate ? '=' : '!') . '== 0';
222
-                            }
223
-                            next($params);
224
-                            break;
225
-                        default:
226
-                            throw new CompilationException($compiler, 'If : Syntax error : syntax should be "if $a is [not] (div|even|odd) [by $b]", found ' . $params[$k - 1] . ' is ' . $params[$k + $ptr + 1]);
227
-                    }
228
-                    break;
191
+                case 'div':
192
+                if (isset($params[$k + $ptr + 1]) && strtolower(trim($params[$k + $ptr + 1], '"\'')) === 'by') {
193
+                $p[] = ' % ' . $params[$k + $ptr + 2] . ' ' . ($negate ? '!' : '=') . '== 0';
194
+                next($params);
195
+                next($params);
196
+                next($params);
197
+                } else {
198
+                throw new CompilationException($compiler, 'If : Syntax error : syntax should be "if $a is [not] div by $b", found ' . $params[$k - 1] . ' is ' . ($negate ? 'not ' : '') . 'div ' . $params[$k + $ptr + 1] . ' ' . $params[$k + $ptr + 2]);
199
+                }
200
+                break;
201
+                case 'even':
202
+                $a = array_pop($p);
203
+                if (isset($params[$k + $ptr + 1]) && strtolower(trim($params[$k + $ptr + 1], '"\'')) === 'by') {
204
+                $b   = $params[$k + $ptr + 2];
205
+                $p[] = '(' . $a . ' / ' . $b . ') % 2 ' . ($negate ? '!' : '=') . '== 0';
206
+                next($params);
207
+                next($params);
208
+                } else {
209
+                $p[] = $a . ' % 2 ' . ($negate ? '!' : '=') . '== 0';
210
+                }
211
+                next($params);
212
+                break;
213
+                case 'odd':
214
+                $a = array_pop($p);
215
+                if (isset($params[$k + $ptr + 1]) && strtolower(trim($params[$k + $ptr + 1], '"\'')) === 'by') {
216
+                $b   = $params[$k + $ptr + 2];
217
+                $p[] = '(' . $a . ' / ' . $b . ') % 2 ' . ($negate ? '=' : '!') . '== 0';
218
+                next($params);
219
+                next($params);
220
+                } else {
221
+                $p[] = $a . ' % 2 ' . ($negate ? '=' : '!') . '== 0';
222
+                }
223
+                next($params);
224
+                break;
229 225
                 default:
230
-                    $p[] = $v;
226
+                throw new CompilationException($compiler, 'If : Syntax error : syntax should be "if $a is [not] (div|even|odd) [by $b]", found ' . $params[$k - 1] . ' is ' . $params[$k + $ptr + 1]);
227
+                }
228
+                    break;
229
+            default:
230
+                $p[] = $v;
231 231
             }
232 232
         }
233 233
 
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Blocks/PluginDynamic.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Blocks/PluginTextformat.php 1 patch
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,14 +62,14 @@
 block discarded – undo
62 62
 
63 63
         switch ($style) {
64 64
 
65
-            case 'email':
66
-                $wrap         = 72;
67
-                $indent_first = 0;
68
-                break;
69
-            case 'html':
70
-                $wrap_char   = '<br />';
71
-                $indent_char = $indent_char == "\t" ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '&nbsp;';
72
-                break;
65
+        case 'email':
66
+            $wrap         = 72;
67
+            $indent_first = 0;
68
+            break;
69
+        case 'html':
70
+            $wrap_char   = '<br />';
71
+            $indent_char = $indent_char == "\t" ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '&nbsp;';
72
+            break;
73 73
         }
74 74
 
75 75
         $this->wrap     = (int)$wrap;
Please login to merge, or discard this patch.
lib/Dwoo/Plugins/Blocks/PluginStrip.php 1 patch
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@
 block discarded – undo
67 67
 
68 68
         $mode = trim($params['mode'], '"\'');
69 69
         switch ($mode) {
70
-            case 'js':
71
-            case 'javascript':
72
-                $content = preg_replace('#(?<!:)//\s[^\r\n]*|/\*.*?\*/#s', '', $content);
70
+        case 'js':
71
+        case 'javascript':
72
+            $content = preg_replace('#(?<!:)//\s[^\r\n]*|/\*.*?\*/#s', '', $content);
73 73
 
74
-            case 'default':
75
-            default:
74
+        case 'default':
75
+        default:
76 76
         }
77 77
         $content = preg_replace(array(
78 78
             "/\n/",
Please login to merge, or discard this patch.