@@ -57,7 +57,7 @@ |
||
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 | { |
@@ -1,8 +1,8 @@ |
||
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 |
@@ -29,7 +29,7 @@ |
||
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 | { |
@@ -33,7 +33,7 @@ discard block |
||
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 |
||
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.') |
@@ -1,9 +1,9 @@ |
||
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 |
@@ -20,7 +20,6 @@ |
||
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 | { |
@@ -39,7 +39,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -34,7 +34,7 @@ |
||
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 | } |
@@ -52,7 +52,7 @@ discard block |
||
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 |
||
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 | } |
@@ -17,7 +17,7 @@ |
||
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 | } |
@@ -28,7 +28,7 @@ |
||
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 | } |
@@ -57,7 +57,7 @@ |
||
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'); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * |
21 | 21 | * @return void |
22 | 22 | */ |
23 | - public function __construct($jobs = []) |
|
23 | + public function __construct($jobs = [ ]) |
|
24 | 24 | { |
25 | 25 | $this->jobs = $jobs; |
26 | 26 | } |
@@ -33,7 +33,7 @@ discard block |
||
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 |
||
46 | 46 | { |
47 | 47 | $count = count($this->jobs); |
48 | 48 | $message = new JobMailMessage(); |
49 | - $message->viewData['user_id'] = $notifiable->id; |
|
49 | + $message->viewData[ 'user_id' ] = $notifiable->id; |
|
50 | 50 | $message->subject($count.' job listings found especially for you') |
51 | 51 | ->greeting('Hello,') |
52 | 52 | ->line('We found the following jobs that we think you\'ll be interested in based on your search:'); |
@@ -29,7 +29,7 @@ |
||
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 | { |
@@ -1,9 +1,9 @@ |
||
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 |