@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | // add String Loader functions |
| 68 | 68 | // INFO: |
| 69 | 69 | /** |
| 70 | - * things like e.g. wordwrap or truncate can be done in Twig v3.x with |
|
| 71 | - * 'Lorem ipsum'|u.wordwrap(5) or |
|
| 72 | - * 'Lorem ipsum'|u.truncate(8, '...') repectively. |
|
| 73 | - */ |
|
| 70 | + * things like e.g. wordwrap or truncate can be done in Twig v3.x with |
|
| 71 | + * 'Lorem ipsum'|u.wordwrap(5) or |
|
| 72 | + * 'Lorem ipsum'|u.truncate(8, '...') repectively. |
|
| 73 | + */ |
|
| 74 | 74 | //$functions += $this->getStringLoaderFunctions($twig); |
| 75 | 75 | |
| 76 | 76 | // add Config function |
@@ -91,10 +91,10 @@ discard block |
||
| 91 | 91 | // add Text extensions |
| 92 | 92 | // INFO: |
| 93 | 93 | /** |
| 94 | - * things like e.g. wordwrap or truncate can be done in Twig v3.x with |
|
| 95 | - * 'Lorem ipsum'|u.wordwrap(5) or |
|
| 96 | - * 'Lorem ipsum'|u.truncate(8, '...') repectively. |
|
| 97 | - */ |
|
| 94 | + * things like e.g. wordwrap or truncate can be done in Twig v3.x with |
|
| 95 | + * 'Lorem ipsum'|u.wordwrap(5) or |
|
| 96 | + * 'Lorem ipsum'|u.truncate(8, '...') repectively. |
|
| 97 | + */ |
|
| 98 | 98 | //$filters += $this->getTextFilters($twig); |
| 99 | 99 | |
| 100 | 100 | // add Intl extensions if php5-intl installed |
@@ -105,8 +105,8 @@ discard block |
||
| 105 | 105 | // add Array extensions |
| 106 | 106 | // INFO: |
| 107 | 107 | /** |
| 108 | - * shuffle moved to getPhpFunctions() |
|
| 109 | - */ |
|
| 108 | + * shuffle moved to getPhpFunctions() |
|
| 109 | + */ |
|
| 110 | 110 | //$filters += $this->getArrayFilters(); |
| 111 | 111 | |
| 112 | 112 | // add Time extensions |
@@ -338,13 +338,16 @@ |
||
| 338 | 338 | }, |
| 339 | 339 | 'shuffle' => function ($array) { |
| 340 | 340 | var_dump($array); |
| 341 | - if (!is_array($array)) return $array; |
|
| 341 | + if (!is_array($array)) { |
|
| 342 | + return $array; |
|
| 343 | + } |
|
| 342 | 344 | |
| 343 | 345 | $keys = array_keys($array); |
| 344 | 346 | shuffle($keys); |
| 345 | 347 | $random = array(); |
| 346 | - foreach ($keys as $key) |
|
| 347 | - $random[$key] = $array[$key]; |
|
| 348 | + foreach ($keys as $key) { |
|
| 349 | + $random[$key] = $array[$key]; |
|
| 350 | + } |
|
| 348 | 351 | |
| 349 | 352 | return $random; |
| 350 | 353 | }, |