@@ -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,20 +15,19 @@ 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 | - 'Github' => [], |
|
| 27 | - 'Govt' => [], |
|
| 28 | - 'Ieee' => [], |
|
| 29 | - 'Jobinventory' => [], |
|
| 30 | - 'Monster' => [], |
|
| 31 | - 'Stackoverflow' => [], |
|
| 24 | + 'Careercast' => [ ], |
|
| 25 | + 'Github' => [ ], |
|
| 26 | + 'Govt' => [ ], |
|
| 27 | + 'Ieee' => [ ], |
|
| 28 | + 'Jobinventory' => [ ], |
|
| 29 | + 'Monster' => [ ], |
|
| 30 | + 'Stackoverflow' => [ ], |
|
| 32 | 31 | ]; |
| 33 | 32 | |
| 34 | 33 | /** |
@@ -36,7 +35,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -95,7 +94,7 @@ discard block |
||
| 95 | 94 | * https://www2.jobs2careers.com/advertiser.php |
| 96 | 95 | */ |
| 97 | 96 | if (env("J2C_ID") && env("J2C_PASS")) { |
| 98 | - $jobboards['J2c'] = [ |
|
| 97 | + $jobboards[ 'J2c' ] = [ |
|
| 99 | 98 | 'id' => env("J2C_ID"), |
| 100 | 99 | 'pass' => env("J2C_PASS"), |
| 101 | 100 | ]; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::table('users', function (Blueprint $table) { |
|
| 16 | + Schema::table('users', function(Blueprint $table) { |
|
| 17 | 17 | $table->integer('max_searches')->default(config('app.max_searches'))->nullable(); |
| 18 | 18 | }); |
| 19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function down() |
| 27 | 27 | { |
| 28 | - Schema::table('users', function (Blueprint $table) { |
|
| 28 | + Schema::table('users', function(Blueprint $table) { |
|
| 29 | 29 | $table->dropColumn('max_searches'); |
| 30 | 30 | }); |
| 31 | 31 | } |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | $notificationClass = \JobApis\JobsToMail\Models\CustomDatabaseNotification::class; |
| 9 | 9 | $dataJson = json_decode('[{"url":"http://example.com/","name":"Technical Workforce Recruiter","query":"DevOps","title":"Technical Workforce Recruiter","skills":null,"source":"Careerjet","company":"AE Business Solutions","endDate":null,"industry":null,"location":"Madison, WI","sourceId":null,"startDate":null,"workHours":null,"baseSalary":null,"datePosted":"2017-12-22","description":" to Have: Bachelors degree or higher. Experience recruiting candidates with technical skill sets such as Cloud Architects","jobBenefits":null,"jobLocation":null,"alternateName":null,"maximumSalary":null,"minimumSalary":null,"employmentType":null,"qualifications":null,"salaryCurrency":null,"javascriptAction":null,"responsibilities":null,"hiringOrganization":{"url":null,"logo":null,"name":"AE Business Solutions","email":null,"address":null,"telephone":null,"description":null,"alternateName":null},"javascriptFunction":null,"specialCommitments":null,"occupationalCategory":null,"educationRequirements":null,"incentiveCompensation":null,"experienceRequirements":null}]'); |
| 10 | 10 | |
| 11 | -$factory->define($notificationClass, function (Faker\Generator $faker) use ($dataJson) { |
|
| 11 | +$factory->define($notificationClass, function(Faker\Generator $faker) use ($dataJson) { |
|
| 12 | 12 | return [ |
| 13 | 13 | 'id' => $faker->uuid(), |
| 14 | 14 | 'type' => 'JobApis\JobsToMail\Notifications\JobsCollected', |
@@ -6,19 +6,19 @@ |
||
| 6 | 6 | |-------------------------------------------------------------------------- |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -$factory->define(\JobApis\JobsToMail\Models\User::class, function (Faker\Generator $faker) { |
|
| 9 | +$factory->define(\JobApis\JobsToMail\Models\User::class, function(Faker\Generator $faker) { |
|
| 10 | 10 | return [ |
| 11 | 11 | 'email' => $faker->safeEmail(), |
| 12 | 12 | 'confirmed_at' => null, |
| 13 | 13 | 'max_searches' => $faker->optional()->numberBetween(5, 10), |
| 14 | 14 | ]; |
| 15 | 15 | }); |
| 16 | -$factory->state(\JobApis\JobsToMail\Models\User::class, 'active', function (Faker\Generator $faker) { |
|
| 16 | +$factory->state(\JobApis\JobsToMail\Models\User::class, 'active', function(Faker\Generator $faker) { |
|
| 17 | 17 | return [ |
| 18 | 18 | 'confirmed_at' => $faker->dateTimeThisYear(), |
| 19 | 19 | ]; |
| 20 | 20 | }); |
| 21 | -$factory->state(\JobApis\JobsToMail\Models\User::class, 'deleted', function (Faker\Generator $faker) { |
|
| 21 | +$factory->state(\JobApis\JobsToMail\Models\User::class, 'deleted', function(Faker\Generator $faker) { |
|
| 22 | 22 | return [ |
| 23 | 23 | 'deleted_at' => $faker->dateTimeThisYear(), |
| 24 | 24 | ]; |
@@ -8,9 +8,9 @@ |
||
| 8 | 8 | public function run() |
| 9 | 9 | { |
| 10 | 10 | $csv = League\Csv\Reader::createFromPath(__DIR__.'/recruiters.csv'); |
| 11 | - foreach($csv as $recruiter) { |
|
| 11 | + foreach ($csv as $recruiter) { |
|
| 12 | 12 | Recruiter::create([ |
| 13 | - 'name' => $recruiter[0], |
|
| 13 | + 'name' => $recruiter[ 0 ], |
|
| 14 | 14 | ]); |
| 15 | 15 | } |
| 16 | 16 | } |