Completed
Push — develop ( 51dca3...0a4bcc )
by Kirill
12:12
created
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Message.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@
 block discarded – undo
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
             ]);
Please login to merge, or discard this patch.
app/Observers/MessageObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
app/Room.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public static function make(GitterRoom $gitterRoom, \Closure $new = null)
40 40
     {
41
-        if ($new === null) { $new = function(){}; }
41
+        if ($new === null) { $new = function() {}; }
42 42
 
43 43
         $room = static::where('gitter_id', $gitterRoom->id)->first();
44 44
         if (!$room) {
Please login to merge, or discard this patch.
app/Console/Commands/GitterRoomSyncCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $client = $this->createClient($container, $config->get('gitter.token'));
55 55
 
56 56
         // Search room
57
-        $this->findRoom($client, $this->argument('room'), function (GitterRoom $room) {
57
+        $this->findRoom($client, $this->argument('room'), function(GitterRoom $room) {
58 58
             try {
59 59
                 if ($this->option('users')) {
60 60
                     $this->syncUsers($room);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $this->output->write('Fetching...');
86 86
 
87
-        $room->getUsers()->fetch(function (GitterUser $gitterUser, Controls $controls) {
87
+        $room->getUsers()->fetch(function(GitterUser $gitterUser, Controls $controls) {
88 88
             /** @var User $user */
89 89
             $user = User::make($gitterUser);
90 90
 
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
 
106 106
         $room->getMessages()
107 107
             // Fetch all messages
108
-            ->fetch(function (GitterMessage $message, Controls $controls) {
108
+            ->fetch(function(GitterMessage $message, Controls $controls) {
109 109
                 $this->messageRemember($message, $controls);
110 110
             })
111
-            ->then(function () use ($room) {
111
+            ->then(function() use ($room) {
112 112
                 $this->syncLatestMessages($room);
113 113
             });
114 114
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         if ($lastMessage) {
142 142
             $room->getMessages($lastMessage->gitter_id, GitterRoom::MESSAGE_FETCH_ASC)
143
-                ->fetch(function (GitterMessage $message, Controls $controls) {
143
+                ->fetch(function(GitterMessage $message, Controls $controls) {
144 144
                     $this->messageRemember($message, $controls);
145 145
                 });
146 146
         }
Please login to merge, or discard this patch.
app/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public static function make(GitterRoom $gitterRoom, \Closure $new = null)
40 40
     {
41
-        if ($new === null) { $new = function(){}; }
41
+        if ($new === null) { $new = function() {}; }
42 42
 
43 43
         $room = static::where('gitter_id', $gitterRoom->id)->first();
44 44
         if (!$room) {
Please login to merge, or discard this patch.
app/Gitter/MiddlewaresExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 
97 97
         return $this->container->call([$middleware, 'handle'], [
98 98
             'message' => $message,
99
-            'next'    => function (Message $message) use ($number) {
99
+            'next'    => function(Message $message) use ($number) {
100 100
                 $result = $this->fireMiddleware(++$number, $message);
101 101
 
102 102
                 if (!($result instanceof Response)) {
Please login to merge, or discard this patch.
app/Console/Commands/GitterRoomListenCommand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         /** @var Client $client */
57 57
         $client = $this->createClient($container, $config->get('gitter.token'));
58 58
 
59
-        $this->auth($client, function (User $user) use ($client) {
59
+        $this->auth($client, function(User $user) use ($client) {
60 60
 
61
-            $this->findRoom($client, $this->argument('room'), function (GitterRoom $room) {
61
+            $this->findRoom($client, $this->argument('room'), function(GitterRoom $room) {
62 62
                 try {
63 63
                     $this->listen($room, true);
64 64
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     protected function auth(Client $client, \Closure $callback)
83 83
     {
84 84
         GitterUser::current($client)
85
-            ->then(function (GitterUser $gitterUser) use ($callback) {
85
+            ->then(function(GitterUser $gitterUser) use ($callback) {
86 86
                 $user = User::make($gitterUser);
87 87
                 \Auth::setUser($user);
88 88
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     protected function listen(GitterRoom $gitter, $startup = false)
122 122
     {
123 123
         /** @var Room $room */
124
-        $room = Room::make($gitter, function (Room $room) {
124
+        $room = Room::make($gitter, function(Room $room) {
125 125
             $this->call('gitter:sync', [
126 126
                 'room'       => $room->gitter_id,
127 127
                 '--users'    => true,
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
             Carbon::now()->toDateTimeString()
148 148
         ));
149 149
 
150
-        $gitter->onMessage(function (GitterMessage $msg) {
150
+        $gitter->onMessage(function(GitterMessage $msg) {
151 151
             app(Client::class)->setFallbackMode(false);
152 152
             $this->onMessage($msg);
153 153
 
154
-        }, function (\Throwable $e) use ($loop, $gitter) {
154
+        }, function(\Throwable $e) use ($loop, $gitter) {
155 155
             $this->error($e->getMessage());
156 156
             $this->error($e->getFile() . ':' . $e->getLine());
157 157
             $this->warn('Stream not available. Use message fallback fetch mode.');
@@ -176,13 +176,13 @@  discard block
 block discarded – undo
176 176
             ->first();
177 177
 
178 178
         if ($lastMessage) {
179
-            $loop->addTimer($timeout, function () use ($gitter, $lastMessage) {
179
+            $loop->addTimer($timeout, function() use ($gitter, $lastMessage) {
180 180
                 $gitter->getMessages($lastMessage->gitter_id, GitterRoom::MESSAGE_FETCH_ASC)
181
-                    ->fetch(function (GitterMessage $message, Controls $controls) {
181
+                    ->fetch(function(GitterMessage $message, Controls $controls) {
182 182
                         $this->onMessage($message);
183 183
                         $controls->next();
184 184
                     })
185
-                    ->then(function () use ($gitter) {
185
+                    ->then(function() use ($gitter) {
186 186
                         $this->warn('Connection...');
187 187
                         $this->listen($gitter);
188 188
                     });
Please login to merge, or discard this patch.
app/Gitter/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function setContent($content)
24 24
     {
25
-        $this->empty   = !$content;
25
+        $this->empty = !$content;
26 26
         return parent::setContent($content);
27 27
     }
28 28
 
Please login to merge, or discard this patch.