@@ -53,17 +53,17 @@ |
||
| 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; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | parent::boot(); |
| 44 | 44 | |
| 45 | - static::creating(function ($model) { |
|
| 45 | + static::creating(function($model) { |
|
| 46 | 46 | // Generate a secure random token |
| 47 | 47 | $model->{$model->getKeyName()} = bin2hex(openssl_random_pseudo_bytes(16)); |
| 48 | 48 | }); |
@@ -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'); |
@@ -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.') |
@@ -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:'); |