@@ -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 . '">' |
@@ -62,13 +62,13 @@ |
||
| 62 | 62 | |
| 63 | 63 | switch ($format) { |
| 64 | 64 | case null: $pattern = $this->getDefaultDatePattern($calendar); |
| 65 | - $format = \IntlDateFormatter::SHORT; break; |
|
| 65 | + $format = \IntlDateFormatter::SHORT; break; |
|
| 66 | 66 | case 'short': $format = \IntlDateFormatter::SHORT; break; |
| 67 | 67 | case 'medium': $format = \IntlDateFormatter::MEDIUM; break; |
| 68 | 68 | case 'long': $format = \IntlDateFormatter::LONG; break; |
| 69 | 69 | case 'full': $format = \IntlDateFormatter::FULL; break; |
| 70 | 70 | default: $pattern = $format; |
| 71 | - $format = \IntlDateFormatter::SHORT; break; |
|
| 71 | + $format = \IntlDateFormatter::SHORT; break; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | return [$format, $pattern]; |