Completed
Push — master ( 7bafcc...000aae )
by Karl
04:47
created
app/Models/Search.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@  discard block
 block discarded – undo
2 2
 
3 3
 Route::get('/', 'UsersController@index');
4 4
 
5
-Route::get('/terms', function () {
5
+Route::get('/terms', function() {
6 6
     return view('static.terms');
7 7
 });
8 8
 
9
-Route::group(['prefix' => 'users'], function () {
9
+Route::group([ 'prefix' => 'users' ], function() {
10 10
 
11 11
     // Create new user
12 12
     Route::post('/', 'UsersController@create');
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     Route::get('/{userId}/searches', 'UsersController@searches');
22 22
 });
23 23
 
24
-Route::group(['prefix' => 'searches'], function () {
24
+Route::group([ 'prefix' => 'searches' ], function() {
25 25
 
26 26
     // Unsubscribe by ID
27 27
     Route::get('/{searchId}/unsubscribe', 'SearchesController@unsubscribe');
Please login to merge, or discard this patch.
app/Filters/CollectionFilter.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,6 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
app/Jobs/SearchAndNotifyUser.php 2 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
database/migrations/2016_10_22_134445_recruiters.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
database/seeds/TestingDatabaseSeeder.php 1 patch
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,10 +2,9 @@
 block discarded – undo
2 2
 
3 3
 use Faker\Factory as Faker;
4 4
 use Illuminate\Database\Seeder;
5
-use JobApis\JobsToMail\Models\User;
6
-use JobApis\JobsToMail\Models\Recruiter;
7 5
 use JobApis\JobsToMail\Models\Search;
8 6
 use JobApis\JobsToMail\Models\Token;
7
+use JobApis\JobsToMail\Models\User;
9 8
 
10 9
 class TestingDatabaseSeeder extends Seeder
11 10
 {
Please login to merge, or discard this patch.
app/Models/Recruiter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         parent::boot();
32 32
 
33
-        static::creating(function ($model) {
33
+        static::creating(function($model) {
34 34
             $model->{$model->getKeyName()} = Uuid::uuid4();
35 35
         });
36 36
     }
@@ -46,6 +46,6 @@  discard block
 block discarded – undo
46 46
     public function scopeWhereNameLike($query, $name = null)
47 47
     {
48 48
         $where = "to_tsvector('english', name) @@ plainto_tsquery('english', ?)";
49
-        return $query->whereRaw($where, [$name]);
49
+        return $query->whereRaw($where, [ $name ]);
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
app/Filters/RecruiterFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
app/Filters/JobFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@
 block discarded – undo
9 9
      *
10 10
      * @return array
11 11
      */
12
-    public function sort($jobs = [], $maxAge = 14, $maxJobs = 50)
12
+    public function sort($jobs = [ ], $maxAge = 14, $maxJobs = 50)
13 13
     {
14 14
         // Sort by date
15
-        usort($jobs, function ($item1, $item2) {
15
+        usort($jobs, function($item1, $item2) {
16 16
             return $item2->datePosted <=> $item1->datePosted;
17 17
         });
18 18
         // Filter any older than max age
19
-        $jobs = array_filter($jobs, function ($job) use ($maxAge) {
19
+        $jobs = array_filter($jobs, function($job) use ($maxAge) {
20 20
             return $job->datePosted > new \DateTime($maxAge.' days ago');
21 21
         });
22 22
         // Truncate to the max number of results
Please login to merge, or discard this patch.