@@ -17,13 +17,13 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $isImage = preg_match( |
| 19 | 19 | '/[^`]http(?:s)?:\/\/.*?\.(?:jpg|png|jpeg|svg|bmp)/iu' |
| 20 | - , ' ' . $message->text); |
|
| 20 | + , ' '.$message->text); |
|
| 21 | 21 | |
| 22 | 22 | $isVideo = preg_match( |
| 23 | 23 | '/[^`]http(?:s)?:\/\/(?:www\.)?(?:youtube\.com|youtu\.be).*?/iu' |
| 24 | - , ' ' . $message->text); |
|
| 24 | + , ' '.$message->text); |
|
| 25 | 25 | |
| 26 | - if (($isImage || $isVideo) && ! $message->user->isBot()) { |
|
| 26 | + if (($isImage || $isVideo) && !$message->user->isBot()) { |
|
| 27 | 27 | $answer = trans('gitter.inline', [ |
| 28 | 28 | 'user' => $message->user->login |
| 29 | 29 | ]); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | $this->text = preg_replace_callback('%\[user\]([\W\D\w\s]*?)\[/user\]%iu', |
| 44 | 44 | |
| 45 | - function ($matches) { |
|
| 45 | + function($matches) { |
|
| 46 | 46 | $username = trim($matches[1]); |
| 47 | 47 | |
| 48 | 48 | return empty($username) ? "" : "@{$username}"; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | $this->text = preg_replace_callback('%\[pre\]([\W\D\w\s]*?)\[/pre\]%iu', |
| 61 | 61 | |
| 62 | - function ($matches) { |
|
| 62 | + function($matches) { |
|
| 63 | 63 | return "`{$matches[1]}`"; |
| 64 | 64 | }, |
| 65 | 65 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $this->text = preg_replace_callback('%\[h([0-6]{1})\]([\W\D\w\s]*?)\[/h[0-6]?\]%iu', |
| 76 | 76 | |
| 77 | - function ($matches) { |
|
| 77 | + function($matches) { |
|
| 78 | 78 | $size = $matches[1]; |
| 79 | 79 | |
| 80 | 80 | return str_repeat('#', $size).' '.$matches[2].PHP_EOL; |