Completed
Push — master ( 74c577...c1ce98 )
by Kirill
06:10
created
app/Core/Doctrine/CacheBridge.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      * @param int $lifeTime The cache lifetime.
70 70
      *                         If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
71 71
      *
72
-     * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
72
+     * @return boolean|null TRUE if the entry was successfully stored in the cache, FALSE otherwise.
73 73
      */
74 74
     public function save($id, $data, $lifeTime = 0)
75 75
     {
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 declare(strict_types = 1);
3 3
 /**
4
- * This file is part of GitterBot package.
5
- *
6
- * @author Serafim <[email protected]>
7
- * @date 03.03.2016 15:08
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
4
+     * This file is part of GitterBot package.
5
+     *
6
+     * @author Serafim <[email protected]>
7
+     * @date 03.03.2016 15:08
8
+     *
9
+     * For the full copyright and license information, please view the LICENSE
10
+     * file that was distributed with this source code.
11
+     */
12 12
 
13 13
 
14 14
 namespace Core\Doctrine;
Please login to merge, or discard this patch.
app/Domains/Message.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     }
75 75
 
76 76
     /**
77
-     * @return mixed|string
77
+     * @return string
78 78
      */
79 79
     public function getEscapedTextAttribute()
80 80
     {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     }
88 88
 
89 89
     /**
90
-     * @return mixed|string
90
+     * @return string
91 91
      */
92 92
     public function getTextWithoutSpecialCharsAttribute()
93 93
     {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     }
119 119
 
120 120
     /**
121
-     * @param $text
121
+     * @param string $text
122 122
      * @return Model
123 123
      */
124 124
     public function pre($text)
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     }
128 128
 
129 129
     /**
130
-     * @param $code
130
+     * @param string $code
131 131
      * @param string $lang
132 132
      * @return Model
133 133
      */
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     }
158 158
 
159 159
     /**
160
-     * @param $symbol
160
+     * @param string $symbol
161 161
      * @param $text
162 162
      * @return string
163 163
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 namespace Domains;
12 12
 
13 13
 use Carbon\Carbon;
14
-use LogicException;
15 14
 use Interfaces\Gitter\Client;
16 15
 use Core\Mappers\MessageMapperTrait;
17 16
 use Illuminate\Database\Eloquent\Model;
Please login to merge, or discard this patch.
app/Interfaces/Console/Commands/GitterSync.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use Carbon\Carbon;
14 14
 use Core\Mappers\UserMapper;
15 15
 use Domains\Message;
16
-use Domains\User;
17 16
 use Gitter\Client;
18 17
 use Gitter\Support\ApiIterator;
19 18
 use Illuminate\Console\Command;
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 24.09.2015 15:27
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 24.09.2015 15:27
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
 
12 12
 namespace App\Gitter\Middleware;
13 13
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 
61 61
         // Sync users
62
-        $db->transaction(function () use ($container) {
62
+        $db->transaction(function() use ($container) {
63 63
             $this->comment('Start users synchronize at ' . ($start = Carbon::now()));
64 64
             $container->call([$this, 'importUsers']);
65 65
             $this->comment('Ends ' . Carbon::now()->diffForHumans($start));
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 
72 72
         // Sync messages
73
-        $db->transaction(function () use ($container) {
73
+        $db->transaction(function() use ($container) {
74 74
             $this->comment('Start messages synchronize at ' . ($start = Carbon::now()));
75 75
             $container->call([$this, 'importMessages']);
76 76
             $this->comment('Ends ' . Carbon::now()->diffForHumans($start));
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
         $rootTimeZone   = new \DateTimeZone('UTC');
94 94
 
95 95
 
96
-        $messages = new ApiIterator(function ($page) use ($client, $room, $limit, &$lastMessageId) {
96
+        $messages = new ApiIterator(function($page) use ($client, $room, $limit, &$lastMessageId) {
97 97
             $query = ['limit' => $limit];
98 98
 
99 99
             if ($lastMessageId !== null) {
100 100
                 $query['beforeId'] = $lastMessageId;
101 101
             }
102 102
 
103
-            $result = $this->rescue(function () use ($room, $query, $client) {
103
+            $result = $this->rescue(function() use ($room, $query, $client) {
104 104
                 return $client->http->getMessages($room->id, $query)->wait();
105 105
             });
106 106
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
              */
137 137
             try {
138 138
 
139
-                $db->transaction(function () use ($message, $data, $db) {
139
+                $db->transaction(function() use ($message, $data, $db) {
140 140
                     $db->table('messages')->where('gitter_id', $data['gitter_id'])->delete();
141 141
                     $db->table('messages')->insert($data);
142 142
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     private function getRoom(Client $client)
178 178
     {
179
-        return $this->rescue(function () use ($client) {
179
+        return $this->rescue(function() use ($client) {
180 180
             return $client->http->getRoomById($this->argument('room'))->wait();
181 181
         });
182 182
     }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     {
193 193
         return (new Evacuator($request))
194 194
             ->retry(Evacuator::INFINITY_RETRIES)
195
-            ->catch(function (\Throwable $e) {
195
+            ->catch(function(\Throwable $e) {
196 196
                 $this->error($e->getMessage() . "\n" . '// retry again');
197 197
                 sleep(1);
198 198
             })
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
         $room = $this->getRoom($client);
211 211
 
212 212
 
213
-        $users = new ApiIterator(function ($page) use ($client, $room) {
214
-            return $this->rescue(function () use ($room, $page, $client) {
213
+        $users = new ApiIterator(function($page) use ($client, $room) {
214
+            return $this->rescue(function() use ($room, $page, $client) {
215 215
 
216 216
                 return $client->http->getRoomUsers($room->id, ['limit' => 30, 'skip' => 30 * $page])->wait();
217 217
 
Please login to merge, or discard this patch.
app/Interfaces/Gitter/Client.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
app/Domains/Message/Url.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 declare(strict_types = 1);
3 3
 /**
4
- * This file is part of GitterBot package.
5
- *
6
- * @author Serafim <[email protected]>
7
- * @date 28.03.2016 14:35
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
4
+     * This file is part of GitterBot package.
5
+     *
6
+     * @author Serafim <[email protected]>
7
+     * @date 28.03.2016 14:35
8
+     *
9
+     * For the full copyright and license information, please view the LICENSE
10
+     * file that was distributed with this source code.
11
+     */
12 12
 namespace Domains\Message;
13 13
 
14 14
 use Core\Mappers\Message\UrlMapper;
Please login to merge, or discard this patch.
app/Domains/Message/Relation.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 declare(strict_types = 1);
3 3
 /**
4
- * This file is part of GitterBot package.
5
- *
6
- * @author Serafim <[email protected]>
7
- * @date 28.03.2016 18:07
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
4
+     * This file is part of GitterBot package.
5
+     *
6
+     * @author Serafim <[email protected]>
7
+     * @date 28.03.2016 18:07
8
+     *
9
+     * For the full copyright and license information, please view the LICENSE
10
+     * file that was distributed with this source code.
11
+     */
12 12
 namespace Domains\Message;
13 13
 
14 14
 use Core\Mappers\Message\RelationMapper;
Please login to merge, or discard this patch.
app/Domains/Message/Message.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 declare(strict_types = 1);
3 3
 /**
4
- * This file is part of GitterBot package.
5
- *
6
- * @author Serafim <[email protected]>
7
- * @date 28.03.2016 14:06
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
4
+     * This file is part of GitterBot package.
5
+     *
6
+     * @author Serafim <[email protected]>
7
+     * @date 28.03.2016 14:06
8
+     *
9
+     * For the full copyright and license information, please view the LICENSE
10
+     * file that was distributed with this source code.
11
+     */
12 12
 namespace Domains\Message;
13 13
 
14 14
 use Carbon\Carbon;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Domains/User/Mention.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 declare(strict_types = 1);
3 3
 /**
4
- * This file is part of GitterBot package.
5
- *
6
- * @author Serafim <[email protected]>
7
- * @date 28.03.2016 14:25
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
4
+     * This file is part of GitterBot package.
5
+     *
6
+     * @author Serafim <[email protected]>
7
+     * @date 28.03.2016 14:25
8
+     *
9
+     * For the full copyright and license information, please view the LICENSE
10
+     * file that was distributed with this source code.
11
+     */
12 12
 
13 13
 namespace Domains\User;
14 14
 
Please login to merge, or discard this patch.
app/Domains/User/User.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 declare(strict_types = 1);
3 3
 /**
4
- * This file is part of GitterBot package.
5
- *
6
- * @author Serafim <[email protected]>
7
- * @date 23.03.2016 20:17
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
4
+     * This file is part of GitterBot package.
5
+     *
6
+     * @author Serafim <[email protected]>
7
+     * @date 23.03.2016 20:17
8
+     *
9
+     * For the full copyright and license information, please view the LICENSE
10
+     * file that was distributed with this source code.
11
+     */
12 12
 namespace Domains\User;
13 13
 
14 14
 use Carbon\Carbon;
Please login to merge, or discard this patch.