@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | public function map(Router $router) |
39 | 39 | { |
40 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
40 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
41 | 41 | require app_path('Http/routes.php'); |
42 | 42 | }); |
43 | 43 | } |
@@ -118,7 +118,7 @@ |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
121 | - * @param $roomId |
|
121 | + * @param string $roomId |
|
122 | 122 | * @return Carbon |
123 | 123 | */ |
124 | 124 | public function getLastKarmaTimeForRoom($roomId) |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | /** |
93 | 93 | * @param callable|null $each |
94 | - * @return \Generator|int |
|
94 | + * @return \Generator |
|
95 | 95 | */ |
96 | 96 | public function syncMessages(callable $each = null) |
97 | 97 | { |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | /** |
124 | 124 | * @param callable|null $each |
125 | - * @return \Generator|int |
|
125 | + * @return \Generator |
|
126 | 126 | */ |
127 | 127 | public function syncUsers(callable $each = null) |
128 | 128 | { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | /** @var Client $client */ |
43 | 43 | $client = app(Client::class); |
44 | 44 | |
45 | - return $client->stream($this->gitter_id, function (GitterMessage $gitter) use ($callback) { |
|
45 | + return $client->stream($this->gitter_id, function(GitterMessage $gitter) use ($callback) { |
|
46 | 46 | $message = Message::createFromGitterMessage($gitter); |
47 | 47 | $callback($this, $message); |
48 | 48 | }, $rejected); |
@@ -20,6 +20,7 @@ |
||
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @param array ...$args |
23 | + * @param string $args |
|
23 | 24 | * @return array |
24 | 25 | */ |
25 | 26 | public function wait(...$args) |
@@ -80,7 +80,7 @@ |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
83 | - * @param null $size |
|
83 | + * @param null|integer $size |
|
84 | 84 | * @return \Generator |
85 | 85 | */ |
86 | 86 | public function read(int $size = null) |
@@ -67,11 +67,11 @@ |
||
67 | 67 | 'html' => $gitter->html, |
68 | 68 | 'urls' => json_encode($gitter->urls), |
69 | 69 | |
70 | - 'created_at' => (new Carbon($gitter->sent ?? date('Y-m-d H:i:s', 0))) |
|
70 | + 'created_at' => (new Carbon($gitter->sent ? ? date('Y-m-d H:i:s', 0))) |
|
71 | 71 | ->setTimezone('Europe/Moscow') |
72 | 72 | ->timestamp, |
73 | 73 | |
74 | - 'updated_at' => (new Carbon($gitter->editedAt ?? date('Y-m-d H:i:s', 0))) |
|
74 | + 'updated_at' => (new Carbon($gitter->editedAt ? ? date('Y-m-d H:i:s', 0))) |
|
75 | 75 | ->setTimezone('Europe/Moscow') |
76 | 76 | ->timestamp, |
77 | 77 | ]); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | 'method' => 'PUT', |
29 | 29 | 'body' => ['text' => (string)$message->text], |
30 | 30 | ]) |
31 | - ->then(function ($d) { |
|
31 | + ->then(function($d) { |
|
32 | 32 | return $d->text; |
33 | 33 | }) |
34 | 34 | ->wait(); |