@@ -15,7 +15,7 @@ |
||
15 | 15 | /** |
16 | 16 | * Create a new job instance. |
17 | 17 | */ |
18 | - public function __construct($data = []) |
|
18 | + public function __construct($data = [ ]) |
|
19 | 19 | { |
20 | 20 | $this->data = $data; |
21 | 21 | } |
@@ -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 | } |
@@ -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 | ]; |
@@ -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'); |
@@ -21,7 +21,6 @@ |
||
21 | 21 | /** |
22 | 22 | * Unsubscribe from a search by deleting it. |
23 | 23 | * |
24 | - * @param SearchRepositoryInterface $users |
|
25 | 24 | * |
26 | 25 | * @return FlashMessage |
27 | 26 | */ |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | parent::boot(); |
35 | 35 | |
36 | - static::creating(function ($model) { |
|
36 | + static::creating(function($model) { |
|
37 | 37 | $model->{$model->getKeyName()} = Uuid::uuid4(); |
38 | 38 | }); |
39 | 39 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function scopeActive($query) |
57 | 57 | { |
58 | - return $query->whereHas('user', function ($query) { |
|
58 | + return $query->whereHas('user', function($query) { |
|
59 | 59 | return $query->confirmed(); |
60 | 60 | }); |
61 | 61 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function scopeWhereUserEmail($query, $email = null) |
69 | 69 | { |
70 | - return $query->whereHas('user', function ($query) use ($email) { |
|
70 | + return $query->whereHas('user', function($query) use ($email) { |
|
71 | 71 | return $query->where('email', $email); |
72 | 72 | }); |
73 | 73 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function scopeWhereUserId($query, $id = null) |
81 | 81 | { |
82 | - return $query->whereHas('user', function ($query) use ($id) { |
|
82 | + return $query->whereHas('user', function($query) use ($id) { |
|
83 | 83 | return $query->where('id', $id); |
84 | 84 | }); |
85 | 85 | } |
@@ -100,7 +100,6 @@ |
||
100 | 100 | /** |
101 | 101 | * Logs all the errors attached to a collection |
102 | 102 | * |
103 | - * @param array $jobsByProvider |
|
104 | 103 | * |
105 | 104 | * @return void |
106 | 105 | */ |
@@ -12,16 +12,16 @@ |
||
12 | 12 | * |
13 | 13 | * @return array |
14 | 14 | */ |
15 | - public function getJobsFromCollections($collectionsArray = [], $max = 50) |
|
15 | + public function getJobsFromCollections($collectionsArray = [ ], $max = 50) |
|
16 | 16 | { |
17 | - $jobs = []; |
|
17 | + $jobs = [ ]; |
|
18 | 18 | array_walk_recursive( |
19 | 19 | $collectionsArray, |
20 | - function (Collection $collection) use (&$jobs, $max) { |
|
20 | + function(Collection $collection) use (&$jobs, $max) { |
|
21 | 21 | $this->logErrorsFromCollection($collection); |
22 | 22 | $jobListings = array_slice($collection->all(), 0, $max); |
23 | 23 | foreach ($jobListings as $jobListing) { |
24 | - $jobs[] = $jobListing; |
|
24 | + $jobs[ ] = $jobListing; |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 | ); |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php namespace JobApis\JobsToMail\Jobs; |
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\Models\User; |
10 | 9 | use JobApis\JobsToMail\Notifications\JobsCollected; |
10 | +use JobApis\Jobs\Client\JobsMulti; |
|
11 | 11 | |
12 | 12 | class CollectJobsForUser implements ShouldQueue |
13 | 13 | { |
@@ -20,7 +20,7 @@ |
||
20 | 20 | /** |
21 | 21 | * @var array Jobs collected from providers. |
22 | 22 | */ |
23 | - protected $jobs = []; |
|
23 | + protected $jobs = [ ]; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @var Recruiter recruiter model |
@@ -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,14 +13,14 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('recruiters', function (Blueprint $table) { |
|
16 | + Schema::create('recruiters', function(Blueprint $table) { |
|
17 | 17 | $table->uuid('id')->primary(); |
18 | 18 | $table->string('name')->unique(); |
19 | 19 | $table->string('url')->nullable(); |
20 | 20 | $table->timestamps(); |
21 | 21 | }); |
22 | 22 | |
23 | - Schema::table('searches', function (Blueprint $table) { |
|
23 | + Schema::table('searches', function(Blueprint $table) { |
|
24 | 24 | $table->boolean('no_recruiters')->default(false); |
25 | 25 | }); |
26 | 26 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function down() |
34 | 34 | { |
35 | - Schema::table('searches', function (Blueprint $table) { |
|
35 | + Schema::table('searches', function(Blueprint $table) { |
|
36 | 36 | $table->dropColumn('no_recruiters'); |
37 | 37 | }); |
38 | 38 |