@@ -58,7 +58,7 @@ |
||
| 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 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | */ |
| 68 | 68 | public function registerRoom(GitterRoom $room, array $groups = []) |
| 69 | 69 | { |
| 70 | - $this->rooms[] = (object) [ |
|
| 70 | + $this->rooms[] = (object)[ |
|
| 71 | 71 | 'room' => $room, |
| 72 | 72 | 'groups' => $groups |
| 73 | 73 | ]; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function setContent($content) |
| 23 | 23 | { |
| 24 | - $this->empty = !trim($content); |
|
| 24 | + $this->empty = !trim($content); |
|
| 25 | 25 | return parent::setContent($content); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public static function make(GitterMessage $gitter, \Closure $new = null) |
| 52 | 52 | { |
| 53 | - if ($new === null) { $new = function(){}; } |
|
| 53 | + if ($new === null) { $new = function() {}; } |
|
| 54 | 54 | |
| 55 | 55 | /** @var Message $message */ |
| 56 | 56 | $message = static::where('gitter_id', $gitter->id)->first(); |
@@ -76,10 +76,10 @@ discard block |
||
| 76 | 76 | 'text' => $gitter->text, |
| 77 | 77 | 'html' => $gitter->html, |
| 78 | 78 | 'urls' => json_encode($gitter->urls), |
| 79 | - 'created_at' => (new Carbon($gitter->sent ?? date('Y-m-d H:i:s', 0))) |
|
| 79 | + 'created_at' => (new Carbon($gitter->sent ? ? date('Y-m-d H:i:s', 0))) |
|
| 80 | 80 | ->setTimezone('Europe/Moscow') |
| 81 | 81 | ->timestamp, |
| 82 | - 'updated_at' => (new Carbon($gitter->editedAt ?? date('Y-m-d H:i:s', 0))) |
|
| 82 | + 'updated_at' => (new Carbon($gitter->editedAt ? ? date('Y-m-d H:i:s', 0))) |
|
| 83 | 83 | ->setTimezone('Europe/Moscow') |
| 84 | 84 | ->timestamp, |
| 85 | 85 | ]); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | public function mentions() |
| 105 | 105 | { |
| 106 | - $user = (new User()); |
|
| 106 | + $user = (new User()); |
|
| 107 | 107 | $user->primaryKey = 'gitter_id'; |
| 108 | 108 | |
| 109 | 109 | $parent = (new Message(['gitter_id' => $this->gitter_id])); |