Completed
Push — master ( 48e11a...1a5eae )
by Kirill
05:17 queued 01:41
created
app/Core/Mappers/MessageMapperTrait.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 use App\Message;
16 16
 use Carbon\Carbon;
17 17
 use App\Gitter\Support\AttributeMapper;
18
-use Illuminate\Database\Eloquent\Model;
19 18
 
20 19
 /**
21 20
  * Class MessageMapperTrait
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@  discard block
 block discarded – undo
36 36
         $values = (new AttributeMapper($attributes))
37 37
             ->rename('readBy', 'read_by')
38 38
             ->rename('id', 'gitter_id')
39
-            ->value('editedAt', function ($val) {
39
+            ->value('editedAt', function($val) {
40 40
                 return !!$val;
41 41
             }, 'edited')
42
-            ->value('fromUser', function ($user) {
42
+            ->value('fromUser', function($user) {
43 43
                 return User::fromGitterObject($user);
44 44
             }, 'user')
45
-            ->value('sent', function ($date) {
45
+            ->value('sent', function($date) {
46 46
                 return (new Carbon($date))->setTimezone('Europe/Moscow');
47 47
             }, 'created_at')
48
-            ->value('editedAt', function ($date) {
48
+            ->value('editedAt', function($date) {
49 49
                 return (new Carbon($date))->setTimezone('Europe/Moscow');
50 50
             }, 'updated_at')
51
-            ->value('mentions', function ($mentions) {
51
+            ->value('mentions', function($mentions) {
52 52
                 return static::parseMentions($mentions);
53 53
             })
54 54
             ->only($fields)
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $values['room_id'] = \App::make(Room::class)->id;
59 59
         }
60 60
 
61
-        return static::unguarded(function () use ($values) {
61
+        return static::unguarded(function() use ($values) {
62 62
             return new static($values);
63 63
         });
64 64
     }
Please login to merge, or discard this patch.
app/Domains/Bot/Middlewares/KarmaRenderMiddleware.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     /**
16 16
      * @param Message $message
17
-     * @return mixed
17
+     * @return null|Message
18 18
      */
19 19
     public function handle(Message $message)
20 20
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     {
58 58
         $achievements = [];
59 59
         foreach ($message->user->achievements as $achieve) {
60
-            $achievements[] = '"' . $achieve->title . '"';
60
+            $achievements[] = '"'.$achieve->title.'"';
61 61
         }
62 62
 
63 63
         if (count($achievements)) {
Please login to merge, or discard this patch.
app/Domains/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
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
     {
93 93
         $karma = $this->karma->count();
94 94
 
95
-        return ($karma > 0 ? '+' : '') . $karma;
95
+        return ($karma > 0 ? '+' : '').$karma;
96 96
     }
97 97
 
98 98
     /**
Please login to merge, or discard this patch.
app/Interfaces/Console/Commands/StartGitterBot.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 use Illuminate\Console\Command;
20 20
 use Illuminate\Contracts\Config\Repository;
21 21
 use Illuminate\Contracts\Container\Container;
22
-use Illuminate\Support\Facades\Log;
23 22
 
24 23
 
25 24
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
      */
85 85
     protected function makePidFile()
86 86
     {
87
-        $this->pid = storage_path('pids/' . date('Y_m_d_tis_') . microtime(1) . '.pid');
87
+        $this->pid = storage_path('pids/'.date('Y_m_d_tis_').microtime(1).'.pid');
88 88
         file_put_contents($this->pid, getmypid());
89 89
     }
90 90
 
Please login to merge, or discard this patch.
app/Core/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/Domains/Karma.php 1 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/Domains/Achieve.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
     {
70 70
         parent::boot();
71 71
 
72
-        static::creating(function (Achieve $achieve) {
72
+        static::creating(function(Achieve $achieve) {
73 73
             if (!$achieve->created_at) {
74 74
                 $achieve->created_at = $achieve->freshTimestamp();
75 75
             }
Please login to merge, or discard this patch.
app/Interfaces/Gitter/Http/Stream.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
         $this->headers['Connection'] = 'Keep-Alive';
87 87
 
88
-        $this->buffer->subscribe(function ($message) {
88
+        $this->buffer->subscribe(function($message) {
89 89
             $message = trim($message);
90 90
 
91 91
             if ($message) {
@@ -117,20 +117,20 @@  discard block
 block discarded – undo
117 117
             ->getHttpClient()
118 118
             ->request($this->method, $this->url, $this->headers);
119 119
 
120
-        $request->on('response', function (Response $response) {
121
-            $response->on('data', function ($data, Response $response) {
120
+        $request->on('response', function(Response $response) {
121
+            $response->on('data', function($data, Response $response) {
122 122
                 $data = (string)$data;
123 123
                 $this->events->fire(static::EVENT_CHUNK, [$this, $data, $response]);
124 124
                 $this->buffer->add($data);
125 125
             });
126 126
         });
127 127
 
128
-        $request->on('end', function () {
128
+        $request->on('end', function() {
129 129
             $this->buffer->clear();
130 130
             $this->events->fire(static::EVENT_END, [$this]);
131 131
         });
132 132
 
133
-        $request->on('error', function ($exception) {
133
+        $request->on('error', function($exception) {
134 134
             $this->events->fire(static::EVENT_ERROR, [$this, $exception]);
135 135
         });
136 136
 
Please login to merge, or discard this patch.
app/Interfaces/Http/Controllers/Api/AchievementsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,20 +27,20 @@
 block discarded – undo
27 27
      */
28 28
     public function index()
29 29
     {
30
-        return \Cache::remember('achievements', 10, function () {
30
+        return \Cache::remember('achievements', 10, function() {
31 31
             $achieveStorage = [];
32 32
 
33 33
             (new Achieve())
34 34
                 ->selectRaw('name, count(user_id) as count')
35 35
                 ->groupBy('name')
36 36
                 ->get()
37
-                ->each(function ($item) use (&$achieveStorage) {
37
+                ->each(function($item) use (&$achieveStorage) {
38 38
                     $achieveStorage[$item->name] = $item->count;
39 39
                 });
40 40
 
41 41
             return (new AchieveSubscriber())
42 42
                 ->toCollection()
43
-                ->each(function (AbstractAchieve $achieve) use ($achieveStorage) {
43
+                ->each(function(AbstractAchieve $achieve) use ($achieveStorage) {
44 44
                     $achieve->users = $achieveStorage[$achieve->name] ?? 0;
45 45
                 })
46 46
                 ->toArray();
Please login to merge, or discard this patch.