Completed
Push — master ( 8233f3...3ac9f3 )
by Karl
02:38
created
app/Http/Controllers/UsersController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     /**
58 58
      * Unsubscribe user account
59 59
      *
60
-     * @return string Json of all users
60
+     * @return \Illuminate\Http\RedirectResponse Json of all users
61 61
      */
62 62
     public function unsubscribe(Request $request, $userId)
63 63
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php namespace JobApis\JobsToMail\Http\Controllers;
2 2
 
3
+use Illuminate\Foundation\Validation\ValidatesRequests;
3 4
 use Illuminate\Http\Request;
4 5
 use Illuminate\Routing\Controller as BaseController;
5
-use Illuminate\Foundation\Validation\ValidatesRequests;
6 6
 use JobApis\JobsToMail\Http\Requests\CreateUser;
7 7
 use JobApis\JobsToMail\Repositories\Contracts\UserRepositoryInterface;
8 8
 
Please login to merge, or discard this patch.
app/Notifications/TokenGenerated.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * Get the notification's delivery channels.
30 30
      *
31 31
      * @param  mixed  $notifiable
32
-     * @return array
32
+     * @return string[]
33 33
      */
34 34
     public function via($notifiable)
35 35
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function via($notifiable)
35 35
     {
36
-        return ['mail'];
36
+        return [ 'mail' ];
37 37
     }
38 38
 
39 39
     /**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $url = config('app.url').'users/confirm/'.$this->token;
48 48
         $message = new MailMessage;
49
-        $message->viewData['user_id'] = $notifiable->id;
49
+        $message->viewData[ 'user_id' ] = $notifiable->id;
50 50
         return $message
51 51
             ->subject('Confirm your email address to start receiving jobs')
52 52
             ->greeting('Thank you for joining JobsToMail.com.')
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php namespace JobApis\JobsToMail\Notifications;
2 2
 
3 3
 use Illuminate\Bus\Queueable;
4
-use Illuminate\Notifications\Notification;
5 4
 use Illuminate\Contracts\Queue\ShouldQueue;
6 5
 use Illuminate\Notifications\Messages\MailMessage;
6
+use Illuminate\Notifications\Notification;
7 7
 use JobApis\JobsToMail\Models\Token;
8 8
 
9 9
 class TokenGenerated extends Notification implements ShouldQueue
Please login to merge, or discard this patch.
app/Repositories/UserRepository.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
     /**
21 21
      * UserRepository constructor.
22 22
      *
23
-     * @param User $model
24 23
      */
25 24
     public function __construct(User $users, Token $tokens)
26 25
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $tokenObject = $this->getUnexpiredConfirmationToken($token);
41 41
         if ($tokenObject) {
42
-            if ($this->update($tokenObject->user_id, ['confirmed_at' => Carbon::now()])) {
42
+            if ($this->update($tokenObject->user_id, [ 'confirmed_at' => Carbon::now() ])) {
43 43
                 return true;
44 44
             }
45 45
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      *
54 54
      * @return \JobApis\JobsToMail\Models\User
55 55
      */
56
-    public function create($data = [])
56
+    public function create($data = [ ])
57 57
     {
58 58
         // Create the user
59 59
         if ($user = $this->users->create($data)) {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @return \JobApis\JobsToMail\Models\User
75 75
      */
76
-    public function getById($id = null, $options = [])
76
+    public function getById($id = null, $options = [ ])
77 77
     {
78 78
         return $this->users->where('id', $id)->first();
79 79
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      *
97 97
      * @return boolean
98 98
      */
99
-    public function update($id = null, $data = [])
99
+    public function update($id = null, $data = [ ])
100 100
     {
101 101
         return $this->users->where('id', $id)->update($data);
102 102
     }
Please login to merge, or discard this patch.
app/Jobs/CollectJobsForUser.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,17 +53,17 @@
 block discarded – undo
53 53
         }
54 54
     }
55 55
 
56
-    protected function sortJobs($collectionsArray = [])
56
+    protected function sortJobs($collectionsArray = [ ])
57 57
     {
58
-        $jobs = [];
58
+        $jobs = [ ];
59 59
         // Convert the array of collections to one large array
60 60
         foreach ($collectionsArray as $collection) {
61 61
             foreach (array_slice($collection->all(), 0, 10) as $jobListing) {
62
-                $jobs[] = $jobListing;
62
+                $jobs[ ] = $jobListing;
63 63
             }
64 64
         }
65 65
         // Order by date posted, desc
66
-        usort($jobs, function ($item1, $item2) {
66
+        usort($jobs, function($item1, $item2) {
67 67
             return $item2->datePosted <=> $item1->datePosted;
68 68
         });
69 69
         return $jobs;
Please login to merge, or discard this patch.
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php namespace JobApis\JobsToMail\Jobs;
2 2
 
3 3
 use Illuminate\Bus\Queueable;
4
-use Illuminate\Queue\SerializesModels;
5
-use Illuminate\Queue\InteractsWithQueue;
6 4
 use Illuminate\Contracts\Queue\ShouldQueue;
5
+use Illuminate\Queue\InteractsWithQueue;
6
+use Illuminate\Queue\SerializesModels;
7 7
 use Illuminate\Support\Facades\Log;
8
-use JobApis\Jobs\Client\JobsMulti;
9 8
 use JobApis\JobsToMail\Models\User;
10 9
 use JobApis\JobsToMail\Notifications\JobsCollected;
10
+use JobApis\Jobs\Client\JobsMulti;
11 11
 
12 12
 class CollectJobsForUser implements ShouldQueue
13 13
 {
Please login to merge, or discard this patch.
app/Models/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         parent::boot();
36 36
 
37
-        static::creating(function ($model) {
37
+        static::creating(function($model) {
38 38
             $model->{$model->getKeyName()} = Uuid::uuid4();
39 39
         });
40 40
     }
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         Route::group([
53 53
             'middleware' => 'web',
54 54
             'namespace' => $this->namespace,
55
-        ], function ($router) {
55
+        ], function($router) {
56 56
             require base_path('routes/web.php');
57 57
         });
58 58
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             'middleware' => 'api',
71 71
             'namespace' => $this->namespace,
72 72
             'prefix' => 'api',
73
-        ], function ($router) {
73
+        ], function($router) {
74 74
             require base_path('routes/api.php');
75 75
         });
76 76
     }
Please login to merge, or discard this patch.
app/Providers/BroadcastServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         /*
18 18
          * Authenticate the user's personal channel...
19 19
          */
20
-        Broadcast::channel('App.User.*', function ($user, $userId) {
20
+        Broadcast::channel('App.User.*', function($user, $userId) {
21 21
             return (int) $user->id === (int) $userId;
22 22
         });
23 23
     }
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             \JobApis\JobsToMail\Repositories\UserRepository::class
29 29
         );
30 30
         // Job board API client
31
-        $this->app->bind(JobsMulti::class, function () {
31
+        $this->app->bind(JobsMulti::class, function() {
32 32
             return new JobsMulti(config('jobboards'));
33 33
         });
34 34
     }
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     protected function unauthenticated($request, AuthenticationException $exception)
58 58
     {
59 59
         if ($request->expectsJson()) {
60
-            return response()->json(['error' => 'Unauthenticated.'], 401);
60
+            return response()->json([ 'error' => 'Unauthenticated.' ], 401);
61 61
         }
62 62
 
63 63
         return redirect()->guest('login');
Please login to merge, or discard this patch.