@@ -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 | } |
@@ -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 | } |
@@ -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 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function via($notifiable) |
45 | 45 | { |
46 | - return ['mail', 'database']; |
|
46 | + return [ 'mail', 'database' ]; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | $message = new JobMailMessage(); |
73 | 73 | |
74 | 74 | // Add user and search ID to view data |
75 | - $message->viewData['user_id'] = $notifiable->id; |
|
76 | - $message->viewData['search_id'] = $this->search->id; |
|
75 | + $message->viewData[ 'user_id' ] = $notifiable->id; |
|
76 | + $message->viewData[ 'search_id' ] = $this->search->id; |
|
77 | 77 | |
78 | 78 | // Update the subject |
79 | 79 | $message->subject(count($this->jobs).' job listings found especially for you'); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if ($notifiable->isPremium()) { |
94 | 94 | $message->action( |
95 | 95 | 'Download CSV', |
96 | - url('/collections/' . $this->id . '/download') |
|
96 | + url('/collections/'.$this->id.'/download') |
|
97 | 97 | ); |
98 | 98 | } |
99 | 99 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use Illuminate\Support\Facades\Schema; |
|
4 | -use Illuminate\Database\Schema\Blueprint; |
|
5 | 3 | use Illuminate\Database\Migrations\Migration; |
4 | +use Illuminate\Database\Schema\Blueprint; |
|
5 | +use Illuminate\Support\Facades\Schema; |
|
6 | 6 | |
7 | 7 | class CreateTokensTable extends Migration |
8 | 8 | { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('tokens', function (Blueprint $table) { |
|
16 | + Schema::create('tokens', function(Blueprint $table) { |
|
17 | 17 | $table->string('token'); |
18 | 18 | $table->primary('token'); |
19 | 19 | $table->string('type'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('users', function (Blueprint $table) { |
|
16 | + Schema::create('users', function(Blueprint $table) { |
|
17 | 17 | $table->uuid('id'); |
18 | 18 | $table->primary('id'); |
19 | 19 | $table->string('email')->index(); |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use Illuminate\Support\Facades\Schema; |
|
4 | -use Illuminate\Database\Schema\Blueprint; |
|
5 | 3 | use Illuminate\Database\Migrations\Migration; |
4 | +use Illuminate\Database\Schema\Blueprint; |
|
5 | +use Illuminate\Support\Facades\Schema; |
|
6 | 6 | |
7 | 7 | class CreateTokensTable extends Migration |
8 | 8 | { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | $uri = urldecode( |
11 | - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) |
|
11 | + parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH) |
|
12 | 12 | ); |
13 | 13 | |
14 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the |