@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | // Make sure this search wants to filter recruiters |
| 24 | 24 | if ($search->no_recruiters === true) { |
| 25 | - return array_filter($jobs, function ($job) { |
|
| 25 | + return array_filter($jobs, function($job) { |
|
| 26 | 26 | // Make sure this job has a company |
| 27 | 27 | if (isset($job->company)) { |
| 28 | 28 | // Make sure this company is not a recruiter |
@@ -1,20 +1,20 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (! empty($greeting)) { |
|
| 3 | +if (!empty($greeting)) { |
|
| 4 | 4 | echo $greeting, "\n\n"; |
| 5 | 5 | } else { |
| 6 | 6 | echo $level == 'error' ? 'Whoops!' : 'Hello!', "\n\n"; |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -if (! empty($introLines)) { |
|
| 9 | +if (!empty($introLines)) { |
|
| 10 | 10 | echo implode("\n", $introLines), "\n\n"; |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | if (isset($jobListings)) { |
| 14 | 14 | foreach ($jobListings as $listing) { |
| 15 | - echo $listing['title'].$listing['company'].$listing['location'].": ".$listing['link'], "\n"; |
|
| 16 | - if ($listing['date']) { |
|
| 17 | - echo "Posted on {$listing['date']}", "\n\n"; |
|
| 15 | + echo $listing[ 'title' ].$listing[ 'company' ].$listing[ 'location' ].": ".$listing[ 'link' ], "\n"; |
|
| 16 | + if ($listing[ 'date' ]) { |
|
| 17 | + echo "Posted on {$listing[ 'date' ]}", "\n\n"; |
|
| 18 | 18 | } |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | echo "{$actionText}: {$actionUrl}", "\n\n"; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -if (! empty($outroLines)) { |
|
| 26 | +if (!empty($outroLines)) { |
|
| 27 | 27 | echo implode("\n", $outroLines), "\n\n"; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -3,10 +3,10 @@ discard block |
||
| 3 | 3 | /** |
| 4 | 4 | * Makes a best guess at the server's IP defaulting to localhost. |
| 5 | 5 | */ |
| 6 | -if (isset($_SERVER['REMOTE_ADDR'])) { |
|
| 7 | - $currentIp = $_SERVER['REMOTE_ADDR']; |
|
| 8 | -} elseif (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) { |
|
| 9 | - $ipAddresses = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); |
|
| 6 | +if (isset($_SERVER[ 'REMOTE_ADDR' ])) { |
|
| 7 | + $currentIp = $_SERVER[ 'REMOTE_ADDR' ]; |
|
| 8 | +} elseif (isset($_SERVER[ "HTTP_X_FORWARDED_FOR" ])) { |
|
| 9 | + $ipAddresses = explode(',', $_SERVER[ 'HTTP_X_FORWARDED_FOR' ]); |
|
| 10 | 10 | $currentIp = trim(end($ipAddresses)); |
| 11 | 11 | } else { |
| 12 | 12 | $currentIp = '127.0.0.1'; |
@@ -15,18 +15,17 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * Makes a best guess at the user agent making this request |
| 17 | 17 | */ |
| 18 | -$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : |
|
| 19 | - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'; |
|
| 18 | +$userAgent = isset($_SERVER[ 'HTTP_USER_AGENT' ]) ? $_SERVER[ 'HTTP_USER_AGENT' ] : 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'; |
|
| 20 | 19 | |
| 21 | 20 | /** |
| 22 | 21 | * Default job boards that require no API key permissions |
| 23 | 22 | */ |
| 24 | 23 | $jobboards = [ |
| 25 | - 'Careercast' => [], |
|
| 26 | - 'Dice' => [], |
|
| 27 | - 'Github' => [], |
|
| 28 | - 'Govt' => [], |
|
| 29 | - 'Jobinventory' => [], |
|
| 24 | + 'Careercast' => [ ], |
|
| 25 | + 'Dice' => [ ], |
|
| 26 | + 'Github' => [ ], |
|
| 27 | + 'Govt' => [ ], |
|
| 28 | + 'Jobinventory' => [ ], |
|
| 30 | 29 | ]; |
| 31 | 30 | |
| 32 | 31 | /** |
@@ -34,7 +33,7 @@ discard block |
||
| 34 | 33 | * http://developer.careerbuilder.com/ |
| 35 | 34 | */ |
| 36 | 35 | if (env("CAREERBUILDER_KEY")) { |
| 37 | - $jobboards['Careerbuilder'] = [ |
|
| 36 | + $jobboards[ 'Careerbuilder' ] = [ |
|
| 38 | 37 | 'DeveloperKey' => env("CAREERBUILDER_KEY"), |
| 39 | 38 | ]; |
| 40 | 39 | } |
@@ -43,7 +42,7 @@ discard block |
||
| 43 | 42 | * http://www.indeed.com/publisher |
| 44 | 43 | */ |
| 45 | 44 | if (env("INDEED_KEY")) { |
| 46 | - $jobboards['Indeed'] = [ |
|
| 45 | + $jobboards[ 'Indeed' ] = [ |
|
| 47 | 46 | 'publisher' => env("INDEED_KEY"), |
| 48 | 47 | 'userip' => $currentIp, |
| 49 | 48 | 'useragent' => $userAgent, |
@@ -54,7 +53,7 @@ discard block |
||
| 54 | 53 | * https://developer.usajobs.gov/Search-API/Overview |
| 55 | 54 | */ |
| 56 | 55 | if (env("USAJOBS_KEY")) { |
| 57 | - $jobboards['Usajobs'] = [ |
|
| 56 | + $jobboards[ 'Usajobs' ] = [ |
|
| 58 | 57 | 'AuthorizationKey' => env("USAJOBS_KEY"), |
| 59 | 58 | ]; |
| 60 | 59 | } |
@@ -63,7 +62,7 @@ discard block |
||
| 63 | 62 | * http://www.juju.com/publisher/spec/ |
| 64 | 63 | */ |
| 65 | 64 | if (env("JUJU_KEY")) { |
| 66 | - $jobboards['Juju'] = [ |
|
| 65 | + $jobboards[ 'Juju' ] = [ |
|
| 67 | 66 | 'partnerid' => env("JUJU_KEY"), |
| 68 | 67 | 'ipaddress' => $currentIp, |
| 69 | 68 | 'useragent' => $userAgent, |
@@ -75,7 +74,7 @@ discard block |
||
| 75 | 74 | * https://www.ziprecruiter.com/publishers |
| 76 | 75 | */ |
| 77 | 76 | if (env("ZIPRECRUITER_KEY")) { |
| 78 | - $jobboards['Ziprecruiter'] = [ |
|
| 77 | + $jobboards[ 'Ziprecruiter' ] = [ |
|
| 79 | 78 | 'api_key' => env("ZIPRECRUITER_KEY"), |
| 80 | 79 | ]; |
| 81 | 80 | } |
@@ -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 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function login(LoginUser $request) |
| 35 | 35 | { |
| 36 | - $email = $request->only('email')['email']; |
|
| 36 | + $email = $request->only('email')[ 'email' ]; |
|
| 37 | 37 | |
| 38 | 38 | $message = $this->dispatchNow(new SendLoginMessage($email)); |
| 39 | 39 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public function postConfirm(Request $request) |
| 61 | 61 | { |
| 62 | - return $this->confirm($request, $request->only('token')['token']); |
|
| 62 | + return $this->confirm($request, $request->only('token')[ 'token' ]); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -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 |
@@ -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.') |
@@ -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('/'); |
@@ -6,19 +6,19 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function confirm(User $user); |
| 8 | 8 | |
| 9 | - public function create($data = []); |
|
| 9 | + public function create($data = [ ]); |
|
| 10 | 10 | |
| 11 | 11 | public function delete($id = null); |
| 12 | 12 | |
| 13 | - public function firstOrCreate($data = []); |
|
| 13 | + public function firstOrCreate($data = [ ]); |
|
| 14 | 14 | |
| 15 | 15 | public function generateToken($user_id = null, $type = 'confirm'); |
| 16 | 16 | |
| 17 | - public function getById($id = null, $options = []); |
|
| 17 | + public function getById($id = null, $options = [ ]); |
|
| 18 | 18 | |
| 19 | 19 | public function getToken($token = null, $daysToExpire = 30); |
| 20 | 20 | |
| 21 | - public function getByEmail($email = null, $options = []); |
|
| 21 | + public function getByEmail($email = null, $options = [ ]); |
|
| 22 | 22 | |
| 23 | - public function update($id = null, $data = []); |
|
| 23 | + public function update($id = null, $data = [ ]); |
|
| 24 | 24 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public function confirm(User $user) |
| 39 | 39 | { |
| 40 | 40 | if (!$user->confirmed_at) { |
| 41 | - if ($this->update($user->id, ['confirmed_at' => Carbon::now()])) { |
|
| 41 | + if ($this->update($user->id, [ 'confirmed_at' => Carbon::now() ])) { |
|
| 42 | 42 | return true; |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @return \JobApis\JobsToMail\Models\User |
| 54 | 54 | */ |
| 55 | - public function create($data = []) |
|
| 55 | + public function create($data = [ ]) |
|
| 56 | 56 | { |
| 57 | 57 | $user = $this->users->create($data); |
| 58 | 58 | |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | * |
| 81 | 81 | * @return \JobApis\JobsToMail\Models\User |
| 82 | 82 | */ |
| 83 | - public function firstOrCreate($data = []) |
|
| 83 | + public function firstOrCreate($data = [ ]) |
|
| 84 | 84 | { |
| 85 | - if ($user = $this->users->where('email', $data['email'])->first()) { |
|
| 85 | + if ($user = $this->users->where('email', $data[ 'email' ])->first()) { |
|
| 86 | 86 | // Resend the user a confirmation token if they haven't confirmed |
| 87 | 87 | if (!$user->confirmed_at) { |
| 88 | 88 | $this->sendConfirmationToken($user); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * |
| 119 | 119 | * @return \JobApis\JobsToMail\Models\User |
| 120 | 120 | */ |
| 121 | - public function getById($id = null, $options = []) |
|
| 121 | + public function getById($id = null, $options = [ ]) |
|
| 122 | 122 | { |
| 123 | 123 | return $this->users->where('id', $id)->first(); |
| 124 | 124 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | * |
| 132 | 132 | * @return \JobApis\JobsToMail\Models\User |
| 133 | 133 | */ |
| 134 | - public function getByEmail($email = null, $options = []) |
|
| 134 | + public function getByEmail($email = null, $options = [ ]) |
|
| 135 | 135 | { |
| 136 | 136 | return $this->users->where('email', $email)->first(); |
| 137 | 137 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * |
| 160 | 160 | * @return boolean |
| 161 | 161 | */ |
| 162 | - public function update($id = null, $data = []) |
|
| 162 | + public function update($id = null, $data = [ ]) |
|
| 163 | 163 | { |
| 164 | 164 | return $this->users->where('id', $id)->update($data); |
| 165 | 165 | } |
@@ -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 |
@@ -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.') |