@@ -15,7 +15,6 @@ |
||
| 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 |
@@ -1,13 +1,13 @@ |
||
| 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:59 |
|
| 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:59 |
|
| 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\Mappers; |
| 12 | 12 | |
| 13 | 13 | use App\Room; |
@@ -36,19 +36,19 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -14,7 +14,7 @@ |
||
| 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 | { |
@@ -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) |
@@ -3,11 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | use Carbon\Carbon; |
| 5 | 5 | use App\Mappers\UserMapperTrait; |
| 6 | - |
|
| 7 | 6 | use Illuminate\Auth\Authenticatable; |
| 8 | 7 | use Illuminate\Auth\Passwords\CanResetPassword; |
| 9 | 8 | use Illuminate\Foundation\Auth\Access\Authorizable; |
| 10 | - |
|
| 11 | 9 | use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; |
| 12 | 10 | use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; |
| 13 | 11 | use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | |
| 13 | 13 | namespace Interfaces\Console\Commands; |
| 14 | 14 | |
| 15 | -use Interfaces\Gitter\Console\CircleProgress; |
|
| 16 | 15 | use Domains\Karma; |
| 17 | 16 | use Domains\User; |
| 18 | 17 | use Domains\Room; |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | |
| 85 | 85 | $request = $this->cursor($client, $room); |
| 86 | - $count = 1; // Start number |
|
| 87 | - $page = 0; // Current page |
|
| 86 | + $count = 1; // Start number |
|
| 87 | + $page = 0; // Current page |
|
| 88 | 88 | $chunk = 100; // Per page |
| 89 | 89 | |
| 90 | 90 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function cursor(Client $client, Room $room) |
| 158 | 158 | { |
| 159 | - return function ($limit = 100, $skip = 0) use ($client, $room) { |
|
| 159 | + return function($limit = 100, $skip = 0) use ($client, $room) { |
|
| 160 | 160 | return $client->request('message.list', [ |
| 161 | 161 | 'roomId' => $room->id, |
| 162 | 162 | 'limit' => $limit, |
@@ -19,7 +19,6 @@ |
||
| 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 | /** |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function handle() |
| 41 | 41 | { |
| 42 | - Karma::created(function (Karma $karma) { |
|
| 42 | + Karma::created(function(Karma $karma) { |
|
| 43 | 43 | |
| 44 | 44 | $count = $karma->target->karma->count(); |
| 45 | 45 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of GitterBot package. |
|
| 4 | - * |
|
| 5 | - * @author Serafim <[email protected]> |
|
| 6 | - * @date 11.10.2015 6:07 |
|
| 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 11.10.2015 6:07 |
|
| 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\Subscribers\Achievements; |
| 12 | 12 | |
| 13 | 13 | use App\Karma; |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of GitterBot package. |
|
| 4 | - * |
|
| 5 | - * @author Serafim <[email protected]> |
|
| 6 | - * @date 11.10.2015 6:07 |
|
| 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 11.10.2015 6:07 |
|
| 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\Subscribers\Achievements; |
| 12 | 12 | |
| 13 | 13 | use App\Karma; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function handle() |
| 41 | 41 | { |
| 42 | - Karma::created(function (Karma $karma) { |
|
| 42 | + Karma::created(function(Karma $karma) { |
|
| 43 | 43 | |
| 44 | 44 | $count = $karma->target->karma->count(); |
| 45 | 45 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This file is part of GitterBot package. |
|
| 4 | - * |
|
| 5 | - * @author Serafim <[email protected]> |
|
| 6 | - * @date 11.10.2015 6:07 |
|
| 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 11.10.2015 6:07 |
|
| 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\Subscribers\Achievements; |
| 12 | 12 | |
| 13 | 13 | use App\Karma; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function handle() |
| 41 | 41 | { |
| 42 | - Karma::created(function (Karma $karma) { |
|
| 42 | + Karma::created(function(Karma $karma) { |
|
| 43 | 43 | |
| 44 | 44 | $count = $karma->target->karma->count(); |
| 45 | 45 | |