@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | return $this->createCsv($csv, $jobs, $this->id.'.csv'); |
54 | 54 | } |
55 | 55 | |
56 | - private function createCsv(Writer $csv, array $items = [], $filename = null) |
|
56 | + private function createCsv(Writer $csv, array $items = [ ], $filename = null) |
|
57 | 57 | { |
58 | 58 | // Make sure line endings are detected. |
59 | 59 | if (!ini_get("auto_detect_line_endings")) { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $csv = $csv->createFromPath($path, 'x+'); |
68 | 68 | |
69 | 69 | // Add header rows |
70 | - $csv->insertOne(array_keys($items[0])); |
|
70 | + $csv->insertOne(array_keys($items[ 0 ])); |
|
71 | 71 | |
72 | 72 | // Add each item as a new line to the CSV |
73 | 73 | $csv->insertAll($items); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | public function boot() |
16 | 16 | { |
17 | 17 | // Only premium users can set this value to true |
18 | - Validator::extend('premium', function ($attribute, $value, $parameters, $validator) { |
|
18 | + Validator::extend('premium', function($attribute, $value, $parameters, $validator) { |
|
19 | 19 | if ($value == 1) { |
20 | 20 | return config('app.user_tiers.premium') === session()->get('user.tier'); |
21 | 21 | } |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | \JobApis\JobsToMail\Repositories\UserRepository::class |
42 | 42 | ); |
43 | 43 | // Job board API client |
44 | - $this->app->bind(JobsMulti::class, function () { |
|
44 | + $this->app->bind(JobsMulti::class, function() { |
|
45 | 45 | return new JobsMulti(config('jobboards')); |
46 | 46 | }); |
47 | 47 | // CSV Writer |
48 | - $this->app->bind('League\Csv\Writer', function ($app) { |
|
48 | + $this->app->bind('League\Csv\Writer', function($app) { |
|
49 | 49 | return Writer::createFromString(''); |
50 | 50 | }); |
51 | 51 | } |
@@ -19,6 +19,6 @@ |
||
19 | 19 | |
20 | 20 | // sleep(2); |
21 | 21 | |
22 | - return response()->download($path, null, ['Content-Type: text/csv']); |
|
22 | + return response()->download($path, null, [ 'Content-Type: text/csv' ]); |
|
23 | 23 | } |
24 | 24 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('notifications', function (Blueprint $table) { |
|
16 | + Schema::table('notifications', function(Blueprint $table) { |
|
17 | 17 | $table->uuid('search_id')->nullable()->unsigned(); |
18 | 18 | $table->foreign('search_id')->references('id')->on('searches'); |
19 | 19 | }); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function down() |
28 | 28 | { |
29 | - Schema::table('notifications', function (Blueprint $table) { |
|
29 | + Schema::table('notifications', function(Blueprint $table) { |
|
30 | 30 | $table->dropColumn('search_id'); |
31 | 31 | }); |
32 | 32 | } |
@@ -7,13 +7,13 @@ |
||
7 | 7 | */ |
8 | 8 | $notificationClass = \JobApis\JobsToMail\Models\CustomDatabaseNotification::class; |
9 | 9 | |
10 | -$factory->define($notificationClass, function (Faker\Generator $faker) { |
|
10 | +$factory->define($notificationClass, function(Faker\Generator $faker) { |
|
11 | 11 | return [ |
12 | 12 | 'id' => $faker->uuid(), |
13 | 13 | 'type' => 'JobApis\JobsToMail\Notifications\JobsCollected', |
14 | 14 | 'notifiable_id' => null, |
15 | 15 | 'notifiable_type' => 'user', |
16 | - 'data' => json_encode([]), |
|
16 | + 'data' => json_encode([ ]), |
|
17 | 17 | 'read_at' => null, |
18 | 18 | ]; |
19 | 19 | }); |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Homepage |
4 | -Route::get('/', function () { |
|
4 | +Route::get('/', function() { |
|
5 | 5 | return view('users.index'); |
6 | 6 | }); |
7 | 7 | |
8 | 8 | // Terms page |
9 | -Route::get('/terms', function () { |
|
9 | +Route::get('/terms', function() { |
|
10 | 10 | return view('static.terms'); |
11 | 11 | }); |
12 | 12 | |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | // Current User Account page |
23 | 23 | Route::get('/searches', 'SearchesController@index')->middleware('auth'); |
24 | 24 | |
25 | -Route::group(['prefix' => 'auth'], function () { |
|
25 | +Route::group([ 'prefix' => 'auth' ], function() { |
|
26 | 26 | // Submit login form (part 1 of login) |
27 | 27 | Route::post('/login', 'AuthController@login'); |
28 | 28 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | Route::get('/confirm/{token}', 'AuthController@confirm'); |
34 | 34 | }); |
35 | 35 | |
36 | -Route::group(['prefix' => 'users'], function () { |
|
36 | +Route::group([ 'prefix' => 'users' ], function() { |
|
37 | 37 | // Create new user |
38 | 38 | Route::post('/', 'UsersController@create'); |
39 | 39 | |
@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | Route::get('/{userId}/searches', 'SearchesController@index'); |
45 | 45 | }); |
46 | 46 | |
47 | -Route::group(['prefix' => 'searches'], function () { |
|
47 | +Route::group([ 'prefix' => 'searches' ], function() { |
|
48 | 48 | // Unsubscribe by ID |
49 | 49 | Route::get('/{searchId}/unsubscribe', 'SearchesController@unsubscribe'); |
50 | 50 | }); |
51 | 51 | |
52 | -Route::group(['prefix' => 'collections'], function () { |
|
52 | +Route::group([ 'prefix' => 'collections' ], function() { |
|
53 | 53 | // Download jobs from a collection |
54 | 54 | Route::get('/{id}/download', 'CollectionsController@download'); |
55 | 55 | }); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function via($notifiable) |
33 | 33 | { |
34 | - return ['mail']; |
|
34 | + return [ 'mail' ]; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ->line('A new user is interested in JobsToMail premium: '); |
48 | 48 | |
49 | 49 | foreach ($this->data as $key => $value) { |
50 | - $message->line($key . ': ' . $value); |
|
50 | + $message->line($key.': '.$value); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | return $message; |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function messages() |
23 | 23 | { |
24 | - return []; |
|
24 | + return [ ]; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -19,11 +19,11 @@ |
||
19 | 19 | /** |
20 | 20 | * Create a new job instance. |
21 | 21 | */ |
22 | - public function __construct($data = []) |
|
22 | + public function __construct($data = [ ]) |
|
23 | 23 | { |
24 | 24 | $this->data = $data; |
25 | 25 | $this->admin = new User( |
26 | - ['email' => env('ADMIN_EMAIL', '[email protected]')] |
|
26 | + [ 'email' => env('ADMIN_EMAIL', '[email protected]') ] |
|
27 | 27 | ); |
28 | 28 | } |
29 | 29 |