Completed
Push — develop ( 2f90e1...bffb25 )
by Kirill
07:59
created
app/User.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
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)
Please login to merge, or discard this 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/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/Karma.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of GitterBot package.
4
- *
5
- * @author Serafim <[email protected]>
6
- * @date 09.10.2015 20:15
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
3
+     * This file is part of GitterBot package.
4
+     *
5
+     * @author Serafim <[email protected]>
6
+     * @date 09.10.2015 20:15
7
+     *
8
+     * For the full copyright and license information, please view the LICENSE
9
+     * file that was distributed with this source code.
10
+     */
11 11
 namespace App;
12 12
 
13 13
 use Carbon\Carbon;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     {
59 59
         parent::boot();
60 60
 
61
-        static::creating(function (Karma $karma) {
61
+        static::creating(function(Karma $karma) {
62 62
             if (!$karma->created_at) {
63 63
                 $karma->created_at = $karma->freshTimestamp();
64 64
             }
Please login to merge, or discard this patch.
app/Support/Lazy/AbstractPromise.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -20,6 +20,7 @@
 block discarded – undo
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)
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/Gitter/Middlewares/KarmaCounter/Validator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
     /**
38 38
      * @param Message $message
39
-     * @return Status[]|Collection
39
+     * @return Collection
40 40
      */
41 41
     public function validate(Message $message)
42 42
     {
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of GitterBot package.
4
- *
5
- * @author Serafim <[email protected]>
6
- * @date 09.10.2015 16:35
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
3
+     * This file is part of GitterBot package.
4
+     *
5
+     * @author Serafim <[email protected]>
6
+     * @date 09.10.2015 16:35
7
+     *
8
+     * For the full copyright and license information, please view the LICENSE
9
+     * file that was distributed with this source code.
10
+     */
11 11
 namespace App\Gitter\Karma;
12 12
 
13 13
 use App\User;
Please login to merge, or discard this patch.
app/Console/Commands/GitterRoomListenCommand.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of GitterBot package.
4
- *
5
- * @author Serafim <[email protected]>
6
- * @date 26.01.2016 4:57
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
3
+     * This file is part of GitterBot package.
4
+     *
5
+     * @author Serafim <[email protected]>
6
+     * @date 26.01.2016 4:57
7
+     *
8
+     * For the full copyright and license information, please view the LICENSE
9
+     * file that was distributed with this source code.
10
+     */
11 11
 namespace App\Console\Commands;
12 12
 
13 13
 use App\Console\CircleProgress;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 
13 13
 
14 14
 use App\Gitter\Extensions\Middlewares\MessageBus;
15
-use App\Support\Lazy\EloquentReader;
16 15
 use App\User;
17 16
 use App\Room;
18 17
 use App\Message;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
         $client = $this->createClient($container, $config->get('gitter.token'));
61 61
 
62 62
 
63
-        $this->auth($client, function (User $user) use ($client) {
64
-            $this->findRoom($client, $this->argument('room'), function (GitterRoom $room) use ($client) {
63
+        $this->auth($client, function(User $user) use ($client) {
64
+            $this->findRoom($client, $this->argument('room'), function(GitterRoom $room) use ($client) {
65 65
                 $this->listen($room, true);
66 66
             });
67 67
         });
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     protected function auth(Client $client, \Closure $callback)
80 80
     {
81 81
         GitterUser::current($client)
82
-            ->then(function (GitterUser $gitterUser) use ($callback) {
82
+            ->then(function(GitterUser $gitterUser) use ($callback) {
83 83
                 $user = User::make($gitterUser);
84 84
                 \Auth::setUser($user);
85 85
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     protected function listen(GitterRoom $gitter, $startup = false)
96 96
     {
97 97
         /** @var Room $room */
98
-        $room = Room::make($gitter, function (Room $room) {
98
+        $room = Room::make($gitter, function(Room $room) {
99 99
             $this->call('gitter:sync', [
100 100
                 'room'       => $room->gitter_id,
101 101
                 '--users'    => true,
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
             Carbon::now()->toDateTimeString()
122 122
         ));
123 123
 
124
-        $gitter->onMessage(function (GitterMessage $msg) {
124
+        $gitter->onMessage(function(GitterMessage $msg) {
125 125
             app(Client::class)->setFallbackMode(false);
126 126
             $this->onMessage($msg);
127 127
 
128
-        }, function (\Throwable $e) use ($loop, $gitter) {
128
+        }, function(\Throwable $e) use ($loop, $gitter) {
129 129
             $this->warn('Stream not available. Use message fallback fetch mode.');
130 130
 
131 131
             app(Client::class)->setFallbackMode(true);
@@ -148,14 +148,14 @@  discard block
 block discarded – undo
148 148
             ->first();
149 149
 
150 150
         if ($lastMessage) {
151
-            $loop->addTimer($timeout, function () use ($gitter, $lastMessage) {
151
+            $loop->addTimer($timeout, function() use ($gitter, $lastMessage) {
152 152
                 $gitter
153 153
                     ->getMessages($lastMessage->gitter_id, GitterRoom::MESSAGE_FETCH_ASC)
154
-                    ->fetch(function (GitterMessage $message, Controls $controls) {
154
+                    ->fetch(function(GitterMessage $message, Controls $controls) {
155 155
                         $this->onMessage($message);
156 156
                         $controls->next();
157 157
                     })
158
-                    ->then(function () use ($gitter) {
158
+                    ->then(function() use ($gitter) {
159 159
                         $this->warn('Connection...');
160 160
                         $this->listen($gitter);
161 161
                     });
Please login to merge, or discard this patch.