@@ -183,6 +183,7 @@ discard block |
||
| 183 | 183 | * Split duration into seconds, minutes, hours, days, weeks and years. |
| 184 | 184 | * |
| 185 | 185 | * @param int $seconds |
| 186 | + * @param integer $max |
|
| 186 | 187 | * @return array |
| 187 | 188 | */ |
| 188 | 189 | protected function splitDuration($seconds, $max) |
@@ -228,7 +229,7 @@ discard block |
||
| 228 | 229 | * |
| 229 | 230 | * @param int $seconds Time in seconds |
| 230 | 231 | * @param array $units Time units (seconds, minutes, hours, days, weeks, years) |
| 231 | - * @param string $separator |
|
| 232 | + * @param string $seperator |
|
| 232 | 233 | * @return string |
| 233 | 234 | */ |
| 234 | 235 | public function duration($seconds, $units = ['s', 'm', 'h', 'd', 'w', 'y'], $seperator = ' ') |
@@ -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 . '">' |