Completed
Push — master ( 638416...694299 )
by Stefano
03:09
created
classes/Text.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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),
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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),
Please login to merge, or discard this patch.