@@ -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 | $user = $this->users->create($data); |
| 59 | 59 | |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | * |
| 70 | 70 | * @return \JobApis\JobsToMail\Models\User |
| 71 | 71 | */ |
| 72 | - public function firstOrCreate($data = []) |
|
| 72 | + public function firstOrCreate($data = [ ]) |
|
| 73 | 73 | { |
| 74 | - if ($user = $this->users->where('email', $data['email'])->first()) { |
|
| 74 | + if ($user = $this->users->where('email', $data[ 'email' ])->first()) { |
|
| 75 | 75 | // Resend the user a confirmation token if they haven't confirmed |
| 76 | 76 | if (!$user->confirmed_at) { |
| 77 | 77 | $this->sendConfirmationToken($user); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @return \JobApis\JobsToMail\Models\User |
| 92 | 92 | */ |
| 93 | - public function getById($id = null, $options = []) |
|
| 93 | + public function getById($id = null, $options = [ ]) |
|
| 94 | 94 | { |
| 95 | 95 | return $this->users->where('id', $id)->first(); |
| 96 | 96 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | * |
| 104 | 104 | * @return boolean |
| 105 | 105 | */ |
| 106 | - public function update($id = null, $data = []) |
|
| 106 | + public function update($id = null, $data = [ ]) |
|
| 107 | 107 | { |
| 108 | 108 | return $this->users->where('id', $id)->update($data); |
| 109 | 109 | } |
@@ -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'); |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | class JobMailMessage extends MailMessage |
| 9 | 9 | { |
| 10 | - public $jobListings = []; |
|
| 10 | + public $jobListings = [ ]; |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * Add a Job listing to the notification |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $line .= " in {$job->getLocation()}"; |
| 27 | 27 | } |
| 28 | 28 | $line .= "."; |
| 29 | - $this->jobListings[] = [ |
|
| 29 | + $this->jobListings[ ] = [ |
|
| 30 | 30 | 'link' => $job->getUrl(), |
| 31 | 31 | 'text' => $line, |
| 32 | 32 | ]; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | return array_merge( |
| 44 | 44 | $this->toArray(), |
| 45 | 45 | $this->viewData, |
| 46 | - ['jobListings' => $this->jobListings] |
|
| 46 | + [ 'jobListings' => $this->jobListings ] |
|
| 47 | 47 | ); |
| 48 | 48 | } |
| 49 | 49 | } |
@@ -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 | |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $results = $this->dispatchNow(new GetUserSearches($userId)); |
| 69 | 69 | |
| 70 | 70 | if (!$results->isEmpty()) { |
| 71 | - return view('searches.index', ['searches' => $results]); |
|
| 71 | + return view('searches.index', [ 'searches' => $results ]); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | return redirect('/'); |