@@ -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,8 +1,8 @@ |
||
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; |
5 | +use Illuminate\Notifications\Notification; |
|
6 | 6 | use Illuminate\Queue\SerializesModels; |
7 | 7 | use JobApis\JobsToMail\Models\Search; |
8 | 8 | use JobApis\JobsToMail\Notifications\Messages\JobMailMessage; |
@@ -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).' new jobs found especially for you'); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | // Add a link to download the collection |
96 | 96 | $message->action( |
97 | 97 | 'View More', |
98 | - url('/notifications/' . $this->id) |
|
98 | + url('/notifications/'.$this->id) |
|
99 | 99 | ); |
100 | 100 | |
101 | 101 | return $message; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php namespace JobApis\JobsToMail\Http\Controllers; |
2 | 2 | |
3 | 3 | use Illuminate\Foundation\Bus\DispatchesJobs; |
4 | +use Illuminate\Foundation\Validation\ValidatesRequests; |
|
4 | 5 | use Illuminate\Http\Request; |
5 | 6 | use Illuminate\Routing\Controller as BaseController; |
6 | -use Illuminate\Foundation\Validation\ValidatesRequests; |
|
7 | 7 | use JobApis\JobsToMail\Jobs\Notifications\GenerateCsv; |
8 | 8 | use JobApis\JobsToMail\Jobs\Notifications\GetNotificationById; |
9 | 9 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $notification = $this->dispatchNow(new GetNotificationById($id)); |
20 | 20 | |
21 | 21 | if ($notification) { |
22 | - return view('notifications.single', ['notification' => $notification]); |
|
22 | + return view('notifications.single', [ 'notification' => $notification ]); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | $request->session()->flash('alert-danger', 'This job alert has expired.'); |
@@ -34,6 +34,6 @@ discard block |
||
34 | 34 | { |
35 | 35 | $path = $this->dispatchNow(new GenerateCsv($id)); |
36 | 36 | |
37 | - return response()->download($path, null, ['Content-Type: text/csv']); |
|
37 | + return response()->download($path, null, [ 'Content-Type: text/csv' ]); |
|
38 | 38 | } |
39 | 39 | } |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php namespace JobApis\JobsToMail\Jobs\Notifications; |
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\Filters\RecruiterFilter; |
10 | 9 | use JobApis\JobsToMail\Models\Recruiter; |
11 | 10 | use JobApis\JobsToMail\Models\Search; |
12 | 11 | use JobApis\JobsToMail\Notifications\JobsCollected; |
12 | +use JobApis\Jobs\Client\JobsMulti; |
|
13 | 13 | |
14 | 14 | class SearchAndNotifyUser implements ShouldQueue |
15 | 15 | { |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | |
6 | 6 | class JobMailMessage extends MailMessage |
7 | 7 | { |
8 | - public $jobListings = []; |
|
8 | + public $jobListings = [ ]; |
|
9 | 9 | public $advertisement = null; |
10 | 10 | |
11 | 11 | /** |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function listing(Job $job) |
19 | 19 | { |
20 | - $this->jobListings[] = [ |
|
20 | + $this->jobListings[ ] = [ |
|
21 | 21 | 'link' => $job->getUrl(), |
22 | 22 | 'title' => $this->getTitle($job->getTitle()), |
23 | 23 | 'company' => $this->getCompany($job->getCompanyName()), |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | return $this->createCsv($csv, $jobs, $this->id.'.csv'); |
54 | 54 | } |
55 | 55 | |
56 | - private function createCsv(Writer $csv, array $items = [], $filename = null) |
|
56 | + private function createCsv(Writer $csv, array $items = [ ], $filename = null) |
|
57 | 57 | { |
58 | 58 | // Make sure line endings are detected. |
59 | 59 | if (!ini_get("auto_detect_line_endings")) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | // Add header rows |
74 | - $csv->insertOne(array_keys($items[0])); |
|
74 | + $csv->insertOne(array_keys($items[ 0 ])); |
|
75 | 75 | |
76 | 76 | // Add each item as a new line to the CSV |
77 | 77 | $csv->insertAll($items); |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Homepage |
4 | -Route::get('/', function () { |
|
4 | +Route::get('/', function() { |
|
5 | 5 | return view('users.index'); |
6 | 6 | }); |
7 | 7 | |
8 | 8 | // Terms page |
9 | -Route::get('/terms', function () { |
|
9 | +Route::get('/terms', function() { |
|
10 | 10 | return view('static.terms'); |
11 | 11 | }); |
12 | 12 | |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | // Current User Account page |
23 | 23 | Route::get('/searches', 'SearchesController@index')->middleware('auth'); |
24 | 24 | |
25 | -Route::group(['prefix' => 'auth'], function () { |
|
25 | +Route::group([ 'prefix' => 'auth' ], function() { |
|
26 | 26 | // Submit login form (part 1 of login) |
27 | 27 | Route::post('/login', 'AuthController@login'); |
28 | 28 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | Route::get('/confirm/{token}', 'AuthController@confirm'); |
34 | 34 | }); |
35 | 35 | |
36 | -Route::group(['prefix' => 'users'], function () { |
|
36 | +Route::group([ 'prefix' => 'users' ], function() { |
|
37 | 37 | // Create new user |
38 | 38 | Route::post('/', 'UsersController@create'); |
39 | 39 | |
@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | Route::get('/{userId}/searches', 'SearchesController@index'); |
45 | 45 | }); |
46 | 46 | |
47 | -Route::group(['prefix' => 'searches'], function () { |
|
47 | +Route::group([ 'prefix' => 'searches' ], function() { |
|
48 | 48 | // Unsubscribe by ID |
49 | 49 | Route::get('/{searchId}/unsubscribe', 'SearchesController@unsubscribe'); |
50 | 50 | }); |
51 | 51 | |
52 | -Route::group(['prefix' => 'notifications'], function () { |
|
52 | +Route::group([ 'prefix' => 'notifications' ], function() { |
|
53 | 53 | // Get a single notification with jobs |
54 | 54 | Route::get('/{id}', 'NotificationsController@single'); |
55 | 55 |