@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
172 | - * @param $route |
|
172 | + * @param string $route |
|
173 | 173 | * @param array $args |
174 | 174 | * @param string $method |
175 | 175 | * @return Stream |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
184 | - * @param $route |
|
184 | + * @param string $route |
|
185 | 185 | * @param array $args |
186 | 186 | * @param null $content |
187 | 187 | * @param string $method |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | return [ |
129 | 129 | 'Content-Type' => 'application/json', |
130 | 130 | 'Accept' => 'application/json', |
131 | - 'Authorization' => 'Bearer ' . $this->token, |
|
131 | + 'Authorization' => 'Bearer '.$this->token, |
|
132 | 132 | ]; |
133 | 133 | } |
134 | 134 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | { |
205 | 205 | $this |
206 | 206 | ->stream('messages', ['roomId' => $room->id()]) |
207 | - ->on(Stream::EVENT_MESSAGE, function ($stream, $data) use($room) { |
|
207 | + ->on(Stream::EVENT_MESSAGE, function($stream, $data) use($room) { |
|
208 | 208 | $this->onMessage( |
209 | 209 | $room->middleware(), |
210 | 210 | Message::unguarded(function() use($room, $data) { |
@@ -272,9 +272,9 @@ discard block |
||
272 | 272 | protected function logException(\Exception $e) |
273 | 273 | { |
274 | 274 | \Log::error( |
275 | - $e->getMessage() . ' in ' . $e->getFile() . ':' . $e->getLine() . "\n" . |
|
276 | - $e->getTraceAsString() . "\n" . |
|
277 | - str_repeat('=', 80) . "\n" |
|
275 | + $e->getMessage().' in '.$e->getFile().':'.$e->getLine()."\n". |
|
276 | + $e->getTraceAsString()."\n". |
|
277 | + str_repeat('=', 80)."\n" |
|
278 | 278 | ); |
279 | 279 | } |
280 | 280 | |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | public function sendMessage(RoomInterface $room, $message) |
286 | 286 | { |
287 | 287 | $this->request('message.send', ['roomId' => $room->id()], [ |
288 | - 'text' => (string) $this->parser->parse($message), |
|
288 | + 'text' => (string)$this->parser->parse($message), |
|
289 | 289 | ], 'POST'); |
290 | 290 | } |
291 | 291 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | preg_match_all('/\w+/iu', $text, $words, PREG_PATTERN_ORDER); |
50 | 50 | |
51 | - return array_map(function ($word) { |
|
51 | + return array_map(function($word) { |
|
52 | 52 | return mb_strtolower($word); |
53 | 53 | }, $words[0]); |
54 | 54 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | |
89 | 89 | /** @var User $mention */ |
90 | 90 | foreach ($message->mentions as $mention) { |
91 | - $question = $this->buffer->last(function ($i, Message $question) use ($mention) { |
|
91 | + $question = $this->buffer->last(function($i, Message $question) use ($mention) { |
|
92 | 92 | if ($question->user) { |
93 | 93 | return $question->user->getId() === $mention->getId(); |
94 | 94 | } |
@@ -35,11 +35,11 @@ |
||
35 | 35 | */ |
36 | 36 | public function register() |
37 | 37 | { |
38 | - AnnotationRegistry::registerLoader(function ($class) { |
|
38 | + AnnotationRegistry::registerLoader(function($class) { |
|
39 | 39 | return class_exists($class); |
40 | 40 | }); |
41 | 41 | |
42 | - $this->app->singleton(Reader::class, function (Application $app) { |
|
42 | + $this->app->singleton(Reader::class, function(Application $app) { |
|
43 | 43 | $debug = $app->make(Repository::class)->get('app.debug', false); |
44 | 44 | $cache = $app->make($debug ? ArrayCache::class : CacheBridge::class); |
45 | 45 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |