Completed
Push — master ( 961524...d13b22 )
by Justin
12:29 queued 07:57
created
dwoo/lib/Dwoo/Plugins/Functions/PluginRegexReplace.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      */
40 40
     public function process($value, $search, $replace)
41 41
     {
42
-        $search = (array)$search;
42
+        $search = (array) $search;
43 43
         $cnt    = count($search);
44 44
 
45 45
         for ($i = 0; $i < $cnt; ++ $i) {
Please login to merge, or discard this patch.
com.jukusoft.cms.dwoo/dwoo/lib/Dwoo/Plugins/Functions/PluginCapitalize.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
     public function process($value, $numwords = false)
39 39
     {
40 40
         if ($numwords || preg_match('#^[^0-9]+$#', $value)) {
41
-            return mb_convert_case((string)$value, MB_CASE_TITLE, $this->core->getCharset());
41
+            return mb_convert_case((string) $value, MB_CASE_TITLE, $this->core->getCharset());
42 42
         } else {
43
-            $bits = explode(' ', (string)$value);
43
+            $bits = explode(' ', (string) $value);
44 44
             $out  = '';
45
-            foreach ($bits as $k => $v){
45
+            foreach ($bits as $k => $v) {
46 46
                 if (preg_match('#^[^0-9]+$#', $v)) {
47 47
                     $out .= ' ' . mb_convert_case($v, MB_CASE_TITLE, $this->core->getCharset());
48 48
                 } else {
Please login to merge, or discard this patch.
com.jukusoft.cms.dwoo/dwoo/lib/Dwoo/Plugins/Functions/PluginDump.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
 
134 134
         $this->outputObjects[] = $obj;
135 135
 
136
-        $list = (array)$obj;
136
+        $list = (array) $obj;
137 137
 
138 138
         $protectedLength = strlen(get_class($obj)) + 2;
139 139
 
Please login to merge, or discard this patch.
com.jukusoft.cms.dwoo/dwoo/lib/Dwoo/Plugins/Functions/PluginCycle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             if ($this->cycles[$name]['index'] >= count($values) - 1) {
78 78
                 $this->cycles[$name]['index'] = 0;
79 79
             } else {
80
-                ++ $this->cycles[$name]['index'];
80
+                ++$this->cycles[$name]['index'];
81 81
             }
82 82
         }
83 83
 
Please login to merge, or discard this patch.
com.jukusoft.cms.dwoo/dwoo/lib/Dwoo/Plugins/Functions/PluginCounter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -51,33 +51,33 @@
 block discarded – undo
51 51
         // init counter
52 52
         if (!isset($this->counters[$name])) {
53 53
             $this->counters[$name] = array(
54
-                'count'     => $start === null ? 1 : (int)$start,
55
-                'skip'      => $skip === null ? 1 : (int)$skip,
56
-                'print'     => $print === null ? true : (bool)$print,
57
-                'assign'    => $assign === null ? null : (string)$assign,
58
-                'direction' => strtolower($direction) === 'down' ? - 1 : 1,
54
+                'count'     => $start === null ? 1 : (int) $start,
55
+                'skip'      => $skip === null ? 1 : (int) $skip,
56
+                'print'     => $print === null ? true : (bool) $print,
57
+                'assign'    => $assign === null ? null : (string) $assign,
58
+                'direction' => strtolower($direction) === 'down' ? -1 : 1,
59 59
             );
60 60
         } // increment
61 61
         else {
62 62
             // override setting if present
63 63
             if ($skip !== null) {
64
-                $this->counters[$name]['skip'] = (int)$skip;
64
+                $this->counters[$name]['skip'] = (int) $skip;
65 65
             }
66 66
 
67 67
             if ($direction !== null) {
68
-                $this->counters[$name]['direction'] = strtolower($direction) === 'down' ? - 1 : 1;
68
+                $this->counters[$name]['direction'] = strtolower($direction) === 'down' ? -1 : 1;
69 69
             }
70 70
 
71 71
             if ($print !== null) {
72
-                $this->counters[$name]['print'] = (bool)$print;
72
+                $this->counters[$name]['print'] = (bool) $print;
73 73
             }
74 74
 
75 75
             if ($assign !== null) {
76
-                $this->counters[$name]['assign'] = (string)$assign;
76
+                $this->counters[$name]['assign'] = (string) $assign;
77 77
             }
78 78
 
79 79
             if ($start !== null) {
80
-                $this->counters[$name]['count'] = (int)$start;
80
+                $this->counters[$name]['count'] = (int) $start;
81 81
             } else {
82 82
                 $this->counters[$name]['count'] += ($this->counters[$name]['skip'] * $this->counters[$name]['direction']);
83 83
             }
Please login to merge, or discard this patch.
com.jukusoft.cms.dwoo/dwoo/lib/Dwoo/Plugins/Functions/PluginMath.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -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
                 }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
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
                     }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 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 !== '\'\'') {
Please login to merge, or discard this patch.
com.jukusoft.cms.dwoo/dwoo/lib/Dwoo/Plugins/Functions/PluginTruncate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@
 block discarded – undo
48 48
             return '';
49 49
         }
50 50
 
51
-        $value  = (string)$value;
52
-        $etc    = (string)$etc;
53
-        $length = (int)$length;
51
+        $value  = (string) $value;
52
+        $etc    = (string) $etc;
53
+        $length = (int) $length;
54 54
 
55 55
         if (strlen($value) < $length) {
56 56
             return $value;
Please login to merge, or discard this patch.
com.jukusoft.cms.dwoo/dwoo/lib/Dwoo/Plugins/Functions/PluginEscape.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -49,34 +49,34 @@  discard block
 block discarded – undo
49 49
 
50 50
         switch ($format) {
51 51
             case 'html':
52
-                return htmlspecialchars((string)$value, ENT_QUOTES, $charset);
52
+                return htmlspecialchars((string) $value, ENT_QUOTES, $charset);
53 53
             case 'htmlall':
54
-                return htmlentities((string)$value, ENT_QUOTES, $charset);
54
+                return htmlentities((string) $value, ENT_QUOTES, $charset);
55 55
             case 'url':
56
-                return rawurlencode((string)$value);
56
+                return rawurlencode((string) $value);
57 57
             case 'urlpathinfo':
58
-                return str_replace('%2F', '/', rawurlencode((string)$value));
58
+                return str_replace('%2F', '/', rawurlencode((string) $value));
59 59
             case 'quotes':
60
-                return preg_replace("#(?<!\\\\)'#", "\\'", (string)$value);
60
+                return preg_replace("#(?<!\\\\)'#", "\\'", (string) $value);
61 61
             case 'hex':
62 62
                 $out = '';
63
-                $cnt = strlen((string)$value);
63
+                $cnt = strlen((string) $value);
64 64
                 for ($i = 0; $i < $cnt; ++ $i) {
65
-                    $out .= '%' . bin2hex((string)$value[$i]);
65
+                    $out .= '%' . bin2hex((string) $value[$i]);
66 66
                 }
67 67
 
68 68
                 return $out;
69 69
             case 'hexentity':
70 70
                 $out = '';
71
-                $cnt = strlen((string)$value);
71
+                $cnt = strlen((string) $value);
72 72
                 for ($i = 0; $i < $cnt; ++ $i) {
73
-                    $out .= '&#x' . bin2hex((string)$value[$i]) . ';';
73
+                    $out .= '&#x' . bin2hex((string) $value[$i]) . ';';
74 74
                 }
75 75
 
76 76
                 return $out;
77 77
             case 'javascript':
78 78
             case 'js':
79
-                return strtr((string)$value,
79
+                return strtr((string) $value,
80 80
                     array(
81 81
                         '\\' => '\\\\',
82 82
                         "'"  => "\\'",
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                         '&nbsp;(AT)&nbsp;',
95 95
                         '&nbsp;(DOT)&nbsp;'
96 96
                     ),
97
-                    (string)$value);
97
+                    (string) $value);
98 98
             default:
99 99
                 $this->core->triggerError('Escape\'s format argument must be one of : html, htmlall, url, urlpathinfo, hex, hexentity, javascript, js or mail, "' . $format . '" given.',
100 100
                     E_USER_WARNING);
Please login to merge, or discard this patch.
com.jukusoft.cms.dwoo/dwoo/lib/Dwoo/Plugins/Functions/PluginInclude.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,11 +66,9 @@
 block discarded – undo
66 66
 
67 67
         try {
68 68
             $include = $this->core->templateFactory($resource, $identifier, $cache_time, $cache_id, $compile_id);
69
-        }
70
-        catch (SecurityException $e) {
69
+        } catch (SecurityException $e) {
71 70
             $this->core->triggerError('Include : Security restriction : ' . $e->getMessage(), E_USER_WARNING);
72
-        }
73
-        catch (Exception $e) {
71
+        } catch (Exception $e) {
74 72
             $this->core->triggerError('Include : ' . $e->getMessage(), E_USER_WARNING);
75 73
         }
76 74
 
Please login to merge, or discard this patch.