@@ -4,11 +4,11 @@ |
||
| 4 | 4 | { |
| 5 | 5 | public function confirm($token = null); |
| 6 | 6 | |
| 7 | - public function create($data = []); |
|
| 7 | + public function create($data = [ ]); |
|
| 8 | 8 | |
| 9 | - public function firstOrCreate($data = []); |
|
| 9 | + public function firstOrCreate($data = [ ]); |
|
| 10 | 10 | |
| 11 | - public function getById($id = null, $options = []); |
|
| 11 | + public function getById($id = null, $options = [ ]); |
|
| 12 | 12 | |
| 13 | - public function update($id = null, $data = []); |
|
| 13 | + public function update($id = null, $data = [ ]); |
|
| 14 | 14 | } |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | interface SearchRepositoryInterface |
| 4 | 4 | { |
| 5 | - public function create($userId = null, $data = []); |
|
| 5 | + public function create($userId = null, $data = [ ]); |
|
| 6 | 6 | |
| 7 | 7 | public function getActive($userEmail = null); |
| 8 | 8 | } |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * @return Search |
| 29 | 29 | */ |
| 30 | - public function create($userId = null, $data = []) |
|
| 30 | + public function create($userId = null, $data = [ ]) |
|
| 31 | 31 | { |
| 32 | 32 | return $this->searches->create( |
| 33 | - array_merge(['user_id' => $userId], $data) |
|
| 33 | + array_merge([ 'user_id' => $userId ], $data) |
|
| 34 | 34 | ); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -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 | } |
@@ -6,13 +6,13 @@ |
||
| 6 | 6 | |-------------------------------------------------------------------------- |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -$factory->define(\JobApis\JobsToMail\Models\Search::class, function (Faker\Generator $faker) { |
|
| 9 | +$factory->define(\JobApis\JobsToMail\Models\Search::class, function(Faker\Generator $faker) { |
|
| 10 | 10 | return [ |
| 11 | 11 | 'keyword' => $faker->word(), |
| 12 | 12 | 'location' => $faker->word().', '.$this->faker->word(), |
| 13 | 13 | ]; |
| 14 | 14 | }); |
| 15 | -$factory->state(\JobApis\JobsToMail\Models\Search::class, 'deleted', function (Faker\Generator $faker) { |
|
| 15 | +$factory->state(\JobApis\JobsToMail\Models\Search::class, 'deleted', function(Faker\Generator $faker) { |
|
| 16 | 16 | return [ |
| 17 | 17 | 'deleted_at' => $faker->dateTimeThisYear(), |
| 18 | 18 | ]; |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('searches', function (Blueprint $table) { |
|
| 16 | + Schema::create('searches', function(Blueprint $table) { |
|
| 17 | 17 | $table->uuid('id'); |
| 18 | 18 | $table->primary('id'); |
| 19 | 19 | $table->uuid('user_id')->unsigned(); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('notifications', function (Blueprint $table) { |
|
| 15 | + Schema::create('notifications', function(Blueprint $table) { |
|
| 16 | 16 | $table->uuid('id')->primary(); |
| 17 | 17 | $table->string('type'); |
| 18 | 18 | $table->uuid('notifiable_id'); |
@@ -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 | /** |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | $count = count($this->jobs); |
| 69 | 69 | $message = new JobMailMessage(); |
| 70 | 70 | // Add user and search ID to view data |
| 71 | - $message->viewData['user_id'] = $notifiable->id; |
|
| 72 | - $message->viewData['search_id'] = $this->search->id; |
|
| 71 | + $message->viewData[ 'user_id' ] = $notifiable->id; |
|
| 72 | + $message->viewData[ 'search_id' ] = $this->search->id; |
|
| 73 | 73 | // Update the message and subject |
| 74 | 74 | $message->subject($count.' job listings found especially for you') |
| 75 | 75 | ->greeting('Hello,') |
@@ -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('/'); |