@@ -92,7 +92,7 @@ |
||
| 92 | 92 | // TODO Add support for non-latin domains |
| 93 | 93 | // Current RFC 1738 |
| 94 | 94 | $pattern = static::getPattern(); |
| 95 | - preg_match_all($pattern, $text . ' ', $matches, PREG_PATTERN_ORDER); |
|
| 95 | + preg_match_all($pattern, $text.' ', $matches, PREG_PATTERN_ORDER); |
|
| 96 | 96 | |
| 97 | 97 | return $matches[1]; |
| 98 | 98 | } |
@@ -17,11 +17,11 @@ |
||
| 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 | 26 | if (($isImage || $isVideo) && $message->user->login !== \Auth::user()->login) { |
| 27 | 27 | $answer = \Lang::get('gitter.inline', [ |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | return null; |
| 27 | 27 | |
| 28 | 28 | } catch (\Exception $e) { |
| 29 | - $message->pre('SQL Builder error: ' . $e->getMessage()); |
|
| 29 | + $message->pre('SQL Builder error: '.$e->getMessage()); |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | { |
| 113 | 113 | $client = $this->client |
| 114 | 114 | ->stream('messages', ['roomId' => $this->id]) |
| 115 | - ->on(Stream::EVENT_MESSAGE, function ($stream, $data) { |
|
| 115 | + ->on(Stream::EVENT_MESSAGE, function($stream, $data) { |
|
| 116 | 116 | $this->onMessage(Message::fromGitterObject($data)); |
| 117 | 117 | }) |
| 118 | 118 | ->on(Stream::EVENT_END, [$this, 'onClose']) |
@@ -127,9 +127,9 @@ discard block |
||
| 127 | 127 | protected function logException(\Exception $e) |
| 128 | 128 | { |
| 129 | 129 | \Log::error( |
| 130 | - $e->getMessage() . ' in ' . $e->getFile() . ':' . $e->getLine() . "\n" . |
|
| 131 | - $e->getTraceAsString() . "\n" . |
|
| 132 | - str_repeat('=', 80) . "\n" |
|
| 130 | + $e->getMessage().' in '.$e->getFile().':'.$e->getLine()."\n". |
|
| 131 | + $e->getTraceAsString()."\n". |
|
| 132 | + str_repeat('=', 80)."\n" |
|
| 133 | 133 | ); |
| 134 | 134 | } |
| 135 | 135 | |
@@ -3,11 +3,11 @@ |
||
| 3 | 3 | if (!function_exists('asset_ts')) { |
| 4 | 4 | function asset_ts($path, $secure = false) |
| 5 | 5 | { |
| 6 | - $url = '/' . $path; |
|
| 6 | + $url = '/'.$path; |
|
| 7 | 7 | |
| 8 | 8 | if (is_file(public_path($path))) { |
| 9 | 9 | $time = filemtime(public_path($path)); |
| 10 | - $url .= '?' . $time; |
|
| 10 | + $url .= '?'.$time; |
|
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | return $url; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function handle() |
| 41 | 41 | { |
| 42 | - Karma::created(function (Karma $karma) { |
|
| 42 | + Karma::created(function(Karma $karma) { |
|
| 43 | 43 | |
| 44 | 44 | $count = $karma->target->karma->count(); |
| 45 | 45 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | if ($isHello) { |
| 51 | 51 | $id = array_rand(\Lang::get('personal.hello')); |
| 52 | 52 | |
| 53 | - $message->italic(\Lang::get('personal.hello.' . $id, [ |
|
| 53 | + $message->italic(\Lang::get('personal.hello.'.$id, [ |
|
| 54 | 54 | 'user' => $message->user->login |
| 55 | 55 | ])); |
| 56 | 56 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | if ($isBan) { |
| 112 | 112 | $message->italic(sprintf( |
| 113 | - '@%s, тебе выданы ' . str_repeat(' :hammer: ', random_int(1, 9)) . ' на 0.' . random_int(1, 9) . ' секунды. Наслаждайся ;)', |
|
| 113 | + '@%s, тебе выданы '.str_repeat(' :hammer: ', random_int(1, 9)).' на 0.'.random_int(1, 9).' секунды. Наслаждайся ;)', |
|
| 114 | 114 | $message->user->login |
| 115 | 115 | )); |
| 116 | 116 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | if ($isPolitics) { |
| 131 | 131 | $message->italic(sprintf( |
| 132 | - '@%s, за ' . $message->text_without_special_chars . '! ' . str_repeat(' :monkey: ', random_int(1, 9)), |
|
| 132 | + '@%s, за '.$message->text_without_special_chars.'! '.str_repeat(' :monkey: ', random_int(1, 9)), |
|
| 133 | 133 | $message->user->login |
| 134 | 134 | )); |
| 135 | 135 | } |