Completed
Push — master ( d83b3e...c28ace )
by Karl
05:23
created
config/jobboards.php 1 patch
Spacing   +18 added lines, -19 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@  discard block
 block discarded – undo
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,20 +15,19 @@  discard block
 block discarded – undo
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
-    'Ieee' => [],
30
-    'Jobinventory' => [],
31
-    'Stackoverflow' => [],
24
+    'Careercast' => [ ],
25
+    'Dice' => [ ],
26
+    'Github' => [ ],
27
+    'Govt' => [ ],
28
+    'Ieee' => [ ],
29
+    'Jobinventory' => [ ],
30
+    'Stackoverflow' => [ ],
32 31
 ];
33 32
 
34 33
 /**
@@ -36,7 +35,7 @@  discard block
 block discarded – undo
36 35
  * http://developer.careerbuilder.com/
37 36
  */
38 37
 if (env("CAREERBUILDER_KEY")) {
39
-    $jobboards['Careerbuilder'] = [
38
+    $jobboards[ 'Careerbuilder' ] = [
40 39
         'DeveloperKey' => env("CAREERBUILDER_KEY"),
41 40
     ];
42 41
 }
@@ -45,7 +44,7 @@  discard block
 block discarded – undo
45 44
  * http://www.careerjet.com/partners/
46 45
  */
47 46
 if (env("CAREERJET_KEY")) {
48
-    $jobboards['Careerjet'] = [
47
+    $jobboards[ 'Careerjet' ] = [
49 48
         'affid' => env("CAREERJET_KEY"),
50 49
     ];
51 50
 }
@@ -54,7 +53,7 @@  discard block
 block discarded – undo
54 53
  * http://www.indeed.com/publisher
55 54
  */
56 55
 if (env("INDEED_KEY")) {
57
-    $jobboards['Indeed'] = [
56
+    $jobboards[ 'Indeed' ] = [
58 57
         'publisher' => env("INDEED_KEY"),
59 58
         'userip' => $currentIp,
60 59
         'useragent' => $userAgent,
@@ -65,7 +64,7 @@  discard block
 block discarded – undo
65 64
  * https://developer.usajobs.gov/Search-API/Overview
66 65
  */
67 66
 if (env("USAJOBS_KEY")) {
68
-    $jobboards['Usajobs'] = [
67
+    $jobboards[ 'Usajobs' ] = [
69 68
         'AuthorizationKey' => env("USAJOBS_KEY"),
70 69
     ];
71 70
 }
@@ -74,7 +73,7 @@  discard block
 block discarded – undo
74 73
  * http://www.juju.com/publisher/spec/
75 74
  */
76 75
 if (env("JUJU_KEY")) {
77
-    $jobboards['Juju'] = [
76
+    $jobboards[ 'Juju' ] = [
78 77
         'partnerid' => env("JUJU_KEY"),
79 78
         'ipaddress' => $currentIp,
80 79
         'useragent' => $userAgent,
@@ -86,7 +85,7 @@  discard block
 block discarded – undo
86 85
  * https://www.ziprecruiter.com/publishers
87 86
  */
88 87
 if (env("ZIPRECRUITER_KEY")) {
89
-    $jobboards['Ziprecruiter'] = [
88
+    $jobboards[ 'Ziprecruiter' ] = [
90 89
         'api_key' => env("ZIPRECRUITER_KEY"),
91 90
     ];
92 91
 }
Please login to merge, or discard this patch.
app/Jobs/Searches/Delete.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
app/Jobs/Users/CreateUserAndSearch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@
 block discarded – undo
34 34
             \JobApis\JobsToMail\Repositories\UserRepository::class
35 35
         );
36 36
         // Job board API client
37
-        $this->app->bind(JobsMulti::class, function () {
37
+        $this->app->bind(JobsMulti::class, function() {
38 38
             return new JobsMulti(config('jobboards'));
39 39
         });
40 40
         // CSV Writer
41
-        $this->app->bind('League\Csv\Writer', function () {
41
+        $this->app->bind('League\Csv\Writer', function() {
42 42
             return Writer::createFromString('');
43 43
         });
44 44
     }
Please login to merge, or discard this patch.
app/Http/Controllers/NotificationsController.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
app/Jobs/Notifications/SearchAndNotifyUser.php 2 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
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
 {
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.
app/Notifications/ConfirmationTokenGenerated.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
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 ConfirmationTokenGenerated extends Notification implements ShouldQueue
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function via($notifiable)
37 37
     {
38
-        return ['mail'];
38
+        return [ 'mail' ];
39 39
     }
40 40
 
41 41
     /**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $url = config('app.url').'auth/confirm/'.$this->token;
50 50
         $message = new MailMessage;
51
-        $message->viewData['user_id'] = $notifiable->id;
51
+        $message->viewData[ 'user_id' ] = $notifiable->id;
52 52
         return $message
53 53
             ->subject('Confirm your email address to start receiving jobs')
54 54
             ->greeting('Thank you for joining '.config('app.name'))
Please login to merge, or discard this patch.
app/Notifications/LoginTokenGenerated.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
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 LoginTokenGenerated extends Notification implements ShouldQueue
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function via($notifiable)
37 37
     {
38
-        return ['mail'];
38
+        return [ 'mail' ];
39 39
     }
40 40
 
41 41
     /**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $url = config('app.url').'auth/confirm/'.$this->token;
50 50
         $message = new MailMessage;
51
-        $message->viewData['user_id'] = $notifiable->id;
51
+        $message->viewData[ 'user_id' ] = $notifiable->id;
52 52
         return $message
53 53
             ->subject('Your Login Token for JobsToMail')
54 54
             ->line('Just click the button below to log in immediately.')
Please login to merge, or discard this patch.
database/seeds/TestingDatabaseSeeder.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 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 5
 use JobApis\JobsToMail\Models\CustomDatabaseNotification as Notification;
7 6
 use JobApis\JobsToMail\Models\Search;
8 7
 use JobApis\JobsToMail\Models\Token;
8
+use JobApis\JobsToMail\Models\User;
9 9
 
10 10
 class TestingDatabaseSeeder extends Seeder
11 11
 {
Please login to merge, or discard this patch.