Completed
Push — 1.2 ( 261ddf...fd7ca1 )
by David
15:45 queued 09:58
created
lib/plugins/builtin/functions/default.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
  */
23 23
 function Dwoo_Plugin_default_compile(Dwoo_Compiler $compiler, $value, $default = '')
24 24
 {
25
-    return '(($tmp = '.$value.')===null||$tmp===\'\' ? '.$default.' : $tmp)';
25
+	return '(($tmp = '.$value.')===null||$tmp===\'\' ? '.$default.' : $tmp)';
26 26
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/capitalize.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@
 block discarded – undo
22 22
  */
23 23
 function Dwoo_Plugin_capitalize(Dwoo_Core $dwoo, $value, $numwords = false)
24 24
 {
25
-    if ($numwords || preg_match('#^[^0-9]+$#', $value)) {
26
-        return mb_convert_case((string) $value, MB_CASE_TITLE, $dwoo->getCharset());
27
-    } else {
28
-        $bits = explode(' ', (string) $value);
29
-        $out = '';
30
-        while (list(, $v) = each($bits)) {
31
-            if (preg_match('#^[^0-9]+$#', $v)) {
32
-                $out .= ' '.mb_convert_case($v, MB_CASE_TITLE, $dwoo->getCharset());
33
-            } else {
34
-                $out .= ' '.$v;
35
-            }
36
-        }
25
+	if ($numwords || preg_match('#^[^0-9]+$#', $value)) {
26
+		return mb_convert_case((string) $value, MB_CASE_TITLE, $dwoo->getCharset());
27
+	} else {
28
+		$bits = explode(' ', (string) $value);
29
+		$out = '';
30
+		while (list(, $v) = each($bits)) {
31
+			if (preg_match('#^[^0-9]+$#', $v)) {
32
+				$out .= ' '.mb_convert_case($v, MB_CASE_TITLE, $dwoo->getCharset());
33
+			} else {
34
+				$out .= ' '.$v;
35
+			}
36
+		}
37 37
 
38
-        return substr($out, 1);
39
-    }
38
+		return substr($out, 1);
39
+	}
40 40
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/count_sentences.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,5 +21,5 @@
 block discarded – undo
21 21
  */
22 22
 function Dwoo_Plugin_count_sentences_compile(Dwoo_Compiler $compiler, $value)
23 23
 {
24
-    return "preg_match_all('#[\w\pL]\.(?![\w\pL])#u', $value, \$tmp)";
24
+	return "preg_match_all('#[\w\pL]\.(?![\w\pL])#u', $value, \$tmp)";
25 25
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/safe.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,5 +21,5 @@
 block discarded – undo
21 21
  */
22 22
 function Dwoo_Plugin_safe_compile(Dwoo_Compiler $compiler, $var)
23 23
 {
24
-    return preg_replace('#\(is_string\(\$tmp=(.+)\) \? htmlspecialchars\(\$tmp, ENT_QUOTES, \$this->charset\) : \$tmp\)#', '$1', $var);
24
+	return preg_replace('#\(is_string\(\$tmp=(.+)\) \? htmlspecialchars\(\$tmp, ENT_QUOTES, \$this->charset\) : \$tmp\)#', '$1', $var);
25 25
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/reverse.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@
 block discarded – undo
22 22
  */
23 23
 function Dwoo_Plugin_reverse(Dwoo_Core $dwoo, $value, $preserve_keys = false)
24 24
 {
25
-    if (is_array($value)) {
26
-        return array_reverse($value, $preserve_keys);
27
-    } elseif (($charset = $dwoo->getCharset()) === 'iso-8859-1') {
28
-        return strrev((string) $value);
29
-    } else {
30
-        $strlen = mb_strlen($value);
31
-        $out = '';
32
-        while ($strlen--) {
33
-            $out .= mb_substr($value, $strlen, 1, $charset);
34
-        }
25
+	if (is_array($value)) {
26
+		return array_reverse($value, $preserve_keys);
27
+	} elseif (($charset = $dwoo->getCharset()) === 'iso-8859-1') {
28
+		return strrev((string) $value);
29
+	} else {
30
+		$strlen = mb_strlen($value);
31
+		$out = '';
32
+		while ($strlen--) {
33
+			$out .= mb_substr($value, $strlen, 1, $charset);
34
+		}
35 35
 
36
-        return $out;
37
-    }
36
+		return $out;
37
+	}
38 38
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/eval.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,17 +29,17 @@
 block discarded – undo
29 29
  */
30 30
 function Dwoo_Plugin_eval(Dwoo_Core $dwoo, $var, $assign = null)
31 31
 {
32
-    if ($var == '') {
33
-        return '';
34
-    }
32
+	if ($var == '') {
33
+		return '';
34
+	}
35 35
 
36
-    $tpl = new Dwoo_Template_String($var);
37
-    $clone = clone $dwoo;
38
-    $out = $clone->get($tpl, $dwoo->readVar('_parent'));
36
+	$tpl = new Dwoo_Template_String($var);
37
+	$clone = clone $dwoo;
38
+	$out = $clone->get($tpl, $dwoo->readVar('_parent'));
39 39
 
40
-    if ($assign !== null) {
41
-        $dwoo->assignInScope($out, $assign);
42
-    } else {
43
-        return $out;
44
-    }
40
+	if ($assign !== null) {
41
+		$dwoo->assignInScope($out, $assign);
42
+	} else {
43
+		return $out;
44
+	}
45 45
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/return.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
  */
28 28
 function Dwoo_Plugin_return_compile(Dwoo_Compiler $compiler, array $rest = array())
29 29
 {
30
-    $out = array();
31
-    foreach ($rest as $var => $val) {
32
-        $out[] = '$this->setReturnValue('.var_export($var, true).', '.$val.')';
33
-    }
30
+	$out = array();
31
+	foreach ($rest as $var => $val) {
32
+		$out[] = '$this->setReturnValue('.var_export($var, true).', '.$val.')';
33
+	}
34 34
 
35
-    return '('.implode('.', $out).')';
35
+	return '('.implode('.', $out).')';
36 36
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/count_paragraphs.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,5 +21,5 @@
 block discarded – undo
21 21
  */
22 22
 function Dwoo_Plugin_count_paragraphs_compile(Dwoo_Compiler $compiler, $value)
23 23
 {
24
-    return '(preg_match_all(\'#[\r\n]+#\', '.$value.', $tmp)+1)';
24
+	return '(preg_match_all(\'#[\r\n]+#\', '.$value.', $tmp)+1)';
25 25
 }
Please login to merge, or discard this patch.
lib/plugins/builtin/functions/isset.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,5 +21,5 @@
 block discarded – undo
21 21
  */
22 22
 function Dwoo_Plugin_isset_compile(Dwoo_Compiler $compiler, $var)
23 23
 {
24
-    return '('.$var.' !== null)';
24
+	return '('.$var.' !== null)';
25 25
 }
Please login to merge, or discard this patch.