@@ -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 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | { |
| 93 | 93 | $karma = $this->karma->count(); |
| 94 | 94 | |
| 95 | - return ($karma > 0 ? '+' : '') . $karma; |
|
| 95 | + return ($karma > 0 ? '+' : '').$karma; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 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', [ |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | { |
| 58 | 58 | $achievements = []; |
| 59 | 59 | foreach ($message->user->achievements as $achieve) { |
| 60 | - $achievements[] = '"' . $achieve->title . '"'; |
|
| 60 | + $achievements[] = '"'.$achieve->title.'"'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | if (count($achievements)) { |
@@ -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 | |
@@ -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 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | $this->text = preg_replace_callback('%\[url\s*=\s*("(?:[^"]*")|\A[^\']*\Z|(?:[^\'">\]\s]+))\s*(?:[^]\s]*)\]([\W\D\w\s]*?)\[/url\]%iu', |
| 23 | 23 | |
| 24 | - function ($matches) { |
|
| 24 | + function($matches) { |
|
| 25 | 25 | if (isset($matches[1]) && isset($matches[2])) |
| 26 | 26 | return "<".$matches[1]."|".$matches[2].">"; |
| 27 | 27 | else |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function sendMessage(RoomInterface $room, $message) |
| 69 | 69 | { |
| 70 | - $this->client->getChannelById($room->id())->then(function (\Slack\Channel $channel) use($message) { |
|
| 70 | + $this->client->getChannelById($room->id())->then(function(\Slack\Channel $channel) use($message) { |
|
| 71 | 71 | $this->client->apiCall('chat.postMessage', [ |
| 72 | - 'text' => (string) $this->parser->parse($message), |
|
| 72 | + 'text' => (string)$this->parser->parse($message), |
|
| 73 | 73 | 'channel' => $channel->getId(), |
| 74 | 74 | 'as_user' => true, |
| 75 | 75 | ]); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function listen(RoomInterface $room) |
| 85 | 85 | { |
| 86 | - $this->client->on('message', function (\Slack\Payload $msg) use($room) { |
|
| 86 | + $this->client->on('message', function(\Slack\Payload $msg) use($room) { |
|
| 87 | 87 | if ($msg->getData()['channel'] != $room->id()) { |
| 88 | 88 | return; |
| 89 | 89 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | ); |
| 100 | 100 | }); |
| 101 | 101 | |
| 102 | - $this->client->on('reaction_added', function (\Slack\Payload $payload) use($room) { |
|
| 102 | + $this->client->on('reaction_added', function(\Slack\Payload $payload) use($room) { |
|
| 103 | 103 | if ($payload->getData()['item']['type'] != 'message' and $payload->getData()['item']['channel'] != $room->id()) { |
| 104 | 104 | return; |
| 105 | 105 | } |
@@ -172,9 +172,9 @@ discard block |
||
| 172 | 172 | protected function logException(\Exception $e) |
| 173 | 173 | { |
| 174 | 174 | \Log::error( |
| 175 | - $e->getMessage() . ' in ' . $e->getFile() . ':' . $e->getLine() . "\n" . |
|
| 176 | - $e->getTraceAsString() . "\n" . |
|
| 177 | - str_repeat('=', 80) . "\n" |
|
| 175 | + $e->getMessage().' in '.$e->getFile().':'.$e->getLine()."\n". |
|
| 176 | + $e->getTraceAsString()."\n". |
|
| 177 | + str_repeat('=', 80)."\n" |
|
| 178 | 178 | ); |
| 179 | 179 | } |
| 180 | 180 | |