@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | * @param mixed $v (default: null) The array of values exposed in template. |
28 | 28 | * @return string |
29 | 29 | */ |
30 | - public static function render($t,$v=null){ |
|
31 | - return preg_replace_callback("(\{\{([^}]+)\}\})S",function($c) use ($v){ |
|
32 | - return Object::fetch(trim($c[1]),$v); |
|
30 | + public static function render($t, $v = null) { |
|
31 | + return preg_replace_callback("(\{\{([^}]+)\}\})S", function($c) use ($v){ |
|
32 | + return Object::fetch(trim($c[1]), $v); |
|
33 | 33 | },$t); |
34 | 34 | } |
35 | 35 | |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | * @param string $text The text to slugify |
46 | 46 | * @return string The slug. |
47 | 47 | */ |
48 | - public static function slugify($text){ |
|
48 | + public static function slugify($text) { |
|
49 | 49 | return preg_replace( |
50 | - ['(\s+)','([^a-z0-9-])i','(-+)'],['-','','-'], |
|
50 | + ['(\s+)', '([^a-z0-9-])i', '(-+)'], ['-', '', '-'], |
|
51 | 51 | strtolower(self::removeAccents($text))); |
52 | 52 | } |
53 | 53 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @param string $text The text to translit |
64 | 64 | * @return string The translited text |
65 | 65 | */ |
66 | - public static function removeAccents($text){ |
|
66 | + public static function removeAccents($text) { |
|
67 | 67 | static $diac; |
68 | 68 | return strtr( |
69 | 69 | utf8_decode($text), |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | * @param mixed $v (default: null) The array of values exposed in template. |
28 | 28 | * @return string |
29 | 29 | */ |
30 | - public static function render($t,$v=null){ |
|
31 | - return preg_replace_callback("(\{\{([^}]+)\}\})S",function($c) use ($v){ |
|
30 | + public static function render($t,$v=null) { |
|
31 | + return preg_replace_callback("(\{\{([^}]+)\}\})S",function($c) use ($v) { |
|
32 | 32 | return Object::fetch(trim($c[1]),$v); |
33 | 33 | },$t); |
34 | 34 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @param string $text The text to slugify |
46 | 46 | * @return string The slug. |
47 | 47 | */ |
48 | - public static function slugify($text){ |
|
48 | + public static function slugify($text) { |
|
49 | 49 | return preg_replace( |
50 | 50 | ['(\s+)','([^a-z0-9-])i','(-+)'],['-','','-'], |
51 | 51 | strtolower(self::removeAccents($text))); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @param string $text The text to translit |
64 | 64 | * @return string The translited text |
65 | 65 | */ |
66 | - public static function removeAccents($text){ |
|
66 | + public static function removeAccents($text) { |
|
67 | 67 | static $diac; |
68 | 68 | return strtr( |
69 | 69 | utf8_decode($text), |