@@ -116,7 +116,9 @@ |
||
| 116 | 116 | : '~(?:(https?)://([^\s<>]+)|(?<!\w@)\b([^\s<>@]+?\.[^\s<>]+)(?<![\.,:]))~i'; |
| 117 | 117 | |
| 118 | 118 | return preg_replace_callback($regexp, function ($match) use ($protocol, &$links, $attr) { |
| 119 | - if ($match[1]) $protocol = $match[1]; |
|
| 119 | + if ($match[1]) { |
|
| 120 | + $protocol = $match[1]; |
|
| 121 | + } |
|
| 120 | 122 | $link = $match[2] ?: $match[3]; |
| 121 | 123 | |
| 122 | 124 | return '<' . array_push($links, '<a' . $attr . ' href="' . $protocol . '://' . $link . '">' |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Callback for Twig to get all the filters. |
| 33 | 33 | * |
| 34 | - * @return \Twig_Filter[] |
|
| 34 | + * @return \Twig_SimpleFilter[] |
|
| 35 | 35 | */ |
| 36 | 36 | public function getFilters() |
| 37 | 37 | { |
@@ -211,6 +211,7 @@ discard block |
||
| 211 | 211 | * Split duration into seconds, minutes, hours, days, weeks and years. |
| 212 | 212 | * |
| 213 | 213 | * @param int $seconds |
| 214 | + * @param integer $max |
|
| 214 | 215 | * @return array |
| 215 | 216 | */ |
| 216 | 217 | protected function splitDuration($seconds, $max) |