Passed
Push — master ( 17b8a2...59afb5 )
by Burak
06:17
created
app/Models/Participant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,5 +14,5 @@
 block discarded – undo
14 14
      *
15 15
      * @var array
16 16
      */
17
-    protected $dates = ['last_read', 'created_at', 'updated_at', 'deleted_at'];
17
+    protected $dates = [ 'last_read', 'created_at', 'updated_at', 'deleted_at' ];
18 18
 }
Please login to merge, or discard this patch.
app/Notifications/ConfirmPassport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function via($notifiable)
31 31
     {
32
-        return ['mail'];
32
+        return [ 'mail' ];
33 33
     }
34 34
 
35 35
     /**
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     protected function redirectTo($request)
16 16
     {
17
-        if (! $request->expectsJson()) {
17
+        if (!$request->expectsJson()) {
18 18
             return route('login');
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
app/Http/Livewire/Profile/PushNotificationForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     public function pushNotification(MessageServiceInterface $messageService)
12 12
     {
13 13
         $subject = 'PING '.now();
14
-        $messageService->newThread($subject, Auth::user(), ['DUMMY PING']);
14
+        $messageService->newThread($subject, Auth::user(), [ 'DUMMY PING' ]);
15 15
     }
16 16
 
17 17
     public function render()
Please login to merge, or discard this patch.
app/Http/Controllers/LoginController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      */
75 75
     public function callback(string $provider, Request $request)
76 76
     {
77
-        $client = $request->session()->get('client', []);
77
+        $client = $request->session()->get('client', [ ]);
78 78
         $user = $this->service->callback($provider, $client);
79 79
         $URI = Arr::get($client, 'redirect_uri', false);
80 80
 
Please login to merge, or discard this patch.
app/Traits/HasUUID.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
      */
12 12
     protected static function bootHasUUID()
13 13
     {
14
-        static::creating(function ($model) {
14
+        static::creating(function($model) {
15 15
             /*
16 16
              * @var \Illuminate\Database\Eloquent\Model
17 17
              */
18
-            if (! $model->getKey()) {
18
+            if (!$model->getKey()) {
19 19
                 $model->{$model->getKeyName()} = Str::uuid()->toString();
20 20
             }
21 21
         });
Please login to merge, or discard this patch.
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/LoginService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
     public function user(string $provider, UserContract $userContract): User
83 83
     {
84 84
         return User::updateOrCreate([
85
-            'provider_name'  => $provider,                       // GitHub, LinkedIn, Google, Apple
86
-            'provider_id'    => $userContract->getId(),          // unsignedBigInteger, uuid
85
+            'provider_name'  => $provider, // GitHub, LinkedIn, Google, Apple
86
+            'provider_id'    => $userContract->getId(), // unsignedBigInteger, uuid
87 87
         ], [
88 88
             'name'           => $userContract->getName() ?? $userContract->getNickname(),
89 89
             /**
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
              * Tokens for retrieve data from authorization
93 93
              * server such as GitHub, Twitter or Google.
94 94
              */
95
-            'email'          => $userContract->getEmail(),       // OAuth provider e-mail address
96
-            'notify_via'     => ['broadcast'],                   // Default notification preference
97
-            'access_token'   => $userContract->token,            // TOKEN
98
-            'refresh_token'  => $userContract->refreshToken,     // TOKEN - some providers have it
99
-            'profile'        => $userContract->user,             // JSON profile data
95
+            'email'          => $userContract->getEmail(), // OAuth provider e-mail address
96
+            'notify_via'     => [ 'broadcast' ], // Default notification preference
97
+            'access_token'   => $userContract->token, // TOKEN
98
+            'refresh_token'  => $userContract->refreshToken, // TOKEN - some providers have it
99
+            'profile'        => $userContract->user, // JSON profile data
100 100
         ]);
101 101
     }
102 102
 
Please login to merge, or discard this patch.
app/Providers/Project/UserServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function register()
17 17
     {
18
-        $this->app->bind(UserServiceInterface::class, function ($app) {
18
+        $this->app->bind(UserServiceInterface::class, function($app) {
19 19
             return new UserService();
20 20
         });
21 21
     }
Please login to merge, or discard this patch.