Passed
Push — master ( 3bb9e9...5085bf )
by Burak
06:05
created
app/Services/MessageService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function thread(string $thread_id): Thread
49 49
     {
50
-        return Thread::with(['messages', 'participants.user'])->find($thread_id);
50
+        return Thread::with([ 'messages', 'participants.user' ])->find($thread_id);
51 51
     }
52 52
 
53 53
     /**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @param null|array $recipients
71 71
      * @return Thread
72 72
      */
73
-    public function newThread(string $subject, User $user, array $content, ?array $recipients = []): Thread
73
+    public function newThread(string $subject, User $user, array $content, ?array $recipients = [ ]): Thread
74 74
     {
75 75
         /** @var $thread Thread */
76 76
         $thread = Thread::create([
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 
80 80
         // Recipients are participants too
81 81
         collect($recipients)
82
-            ->map(function ($recipient) {
82
+            ->map(function($recipient) {
83 83
                 return User::find($recipient);
84 84
             })
85 85
             ->filter()
86
-            ->each(function ($recipient) use ($thread) {
86
+            ->each(function($recipient) use ($thread) {
87 87
                 $this->addParticipant($thread, $recipient);
88 88
             });
89 89
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
             'user_id' => $user->id,
167 167
             'thread_id' => $thread->id,
168 168
         ],
169
-            $mark_as_read ? ['last_read' => now()] : []);
169
+            $mark_as_read ? [ 'last_read' => now() ] : [ ]);
170 170
 
171 171
         $users = $thread->users()->get();
172 172
 
Please login to merge, or discard this patch.
app/Services/ContactService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,12 +57,12 @@
 block discarded – undo
57 57
      */
58 58
     public function setContacts(Collection $users): Collection
59 59
     {
60
-        return $users->map(function ($user) use ($users){
60
+        return $users->map(function($user) use ($users){
61 61
             return $users
62
-                    ->filter(function ($item) use ($user) {
62
+                    ->filter(function($item) use ($user) {
63 63
                         return !$item->is($user);
64 64
                     })
65
-                    ->map(function ($contact) use ($user) {
65
+                    ->map(function($contact) use ($user) {
66 66
                         return $this->addContact($user, $contact);
67 67
                     });
68 68
                 })
Please login to merge, or discard this patch.