Test Failed
Push — master ( 5e7e29...4a0e50 )
by Burak
05:20
created
app/Providers/TelescopeServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
         $this->hideSensitiveRequestDetails();
22 22
 
23
-        Telescope::filter(function (IncomingEntry $entry) {
23
+        Telescope::filter(function(IncomingEntry $entry) {
24 24
             if ($this->app->environment('local')) {
25 25
                 return true;
26 26
             }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             return;
45 45
         }
46 46
 
47
-        Telescope::hideRequestParameters(['_token']);
47
+        Telescope::hideRequestParameters([ '_token' ]);
48 48
 
49 49
         Telescope::hideRequestHeaders([
50 50
             'cookie',
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
      */
63 63
     protected function gate()
64 64
     {
65
-        Gate::define('viewTelescope', function ($user) {
65
+        Gate::define('viewTelescope', function($user) {
66 66
             $mails = explode(',', config('telescope.mail_addresses'));
67 67
 
68
-            return in_array($user->email, $mails ?? []);
68
+            return in_array($user->email, $mails ?? [ ]);
69 69
         });
70 70
     }
71 71
 }
Please login to merge, or discard this patch.
app/Providers/Project/MessageServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function register()
18 18
     {
19
-        $this->app->bind(MessageServiceInterface::class, function ($app) {
19
+        $this->app->bind(MessageServiceInterface::class, function($app) {
20 20
             return new MessageService(
21 21
                 $this->app->make(ContactServiceInterface::class)
22 22
             );
Please login to merge, or discard this patch.
app/Services/ContactService.php 1 patch
Spacing   +4 added lines, -4 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) {
63
-                        return ! $item->is($user);
62
+                    ->filter(function($item) use ($user) {
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.
app/Http/Controllers/MessageController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
         $values = $request->validated();
51 51
         $user = $request->user();
52 52
         $thread = $this->service->newThread(
53
-            $values['subject'],
53
+            $values[ 'subject' ],
54 54
             $user,
55
-            $values['content'],
56
-            Arr::get($values, 'recipients', [])
55
+            $values[ 'content' ],
56
+            Arr::get($values, 'recipients', [ ])
57 57
         );
58 58
 
59 59
         return new ThreadResource($thread);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $message = $this->service->newMessage(
86 86
             $thread,
87 87
             $user,
88
-            $values['body'],
88
+            $values[ 'body' ],
89 89
         );
90 90
 
91 91
         return new MessageResource($message);
Please login to merge, or discard this patch.
app/Interfaces/MessageServiceInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      * @param  array  $recipients
56 56
      * @return Thread
57 57
      */
58
-    public function newThread(string $subject, User $user, array $content, array $recipients = []): Thread;
58
+    public function newThread(string $subject, User $user, array $content, array $recipients = [ ]): Thread;
59 59
 
60 60
     /**
61 61
      * New message.
Please login to merge, or discard this patch.
app/Services/MessageService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function thread(string $thread_id): Thread
67 67
     {
68
-        return Thread::with(['messages', 'participants.user'])->find($thread_id);
68
+        return Thread::with([ 'messages', 'participants.user' ])->find($thread_id);
69 69
     }
70 70
 
71 71
     /**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * @param  null|array  $recipients
100 100
      * @return Thread
101 101
      */
102
-    public function newThread(string $subject, User $user, array $content, ?array $recipients = []): Thread
102
+    public function newThread(string $subject, User $user, array $content, ?array $recipients = [ ]): Thread
103 103
     {
104 104
         /** @var $thread Thread */
105 105
         $thread = Thread::create([
@@ -110,16 +110,16 @@  discard block
 block discarded – undo
110 110
 
111 111
         // Recipients are participants too
112 112
         $recipients = collect($recipients)
113
-            ->map(function ($recipient) {
113
+            ->map(function($recipient) {
114 114
                 return User::find($recipient);
115 115
             })
116 116
             ->add($user)
117 117
             ->unique('id')
118
-            ->map(function ($recipient) use ($thread) {
118
+            ->map(function($recipient) use ($thread) {
119 119
                 return $this->addParticipant($thread, $recipient);
120 120
             });
121 121
 
122
-        $thread->setRelation('messages', collect([$message]));
122
+        $thread->setRelation('messages', collect([ $message ]));
123 123
         $thread->setRelation('participants', $recipients);
124 124
         $users = User::find($recipients->pluck('user_id'));
125 125
         Notification::send($users, new ThreadCreated($thread));
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             'user_id' => $user->id,
194 194
             'thread_id' => $thread->id,
195 195
         ],
196
-            $mark_as_read ? ['last_read' => now()] : []);
196
+            $mark_as_read ? [ 'last_read' => now() ] : [ ]);
197 197
 
198 198
         $users = $thread->users()->get();
199 199
 
Please login to merge, or discard this patch.