@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * |
| 21 | 21 | * @return void |
| 22 | 22 | */ |
| 23 | - public function __construct($jobs = []) |
|
| 23 | + public function __construct($jobs = [ ]) |
|
| 24 | 24 | { |
| 25 | 25 | $this->jobs = $jobs; |
| 26 | 26 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function via($notifiable) |
| 35 | 35 | { |
| 36 | - return ['mail']; |
|
| 36 | + return [ 'mail' ]; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $count = count($this->jobs); |
| 48 | 48 | $message = new JobMailMessage(); |
| 49 | - $message->viewData['user_id'] = $notifiable->id; |
|
| 49 | + $message->viewData[ 'user_id' ] = $notifiable->id; |
|
| 50 | 50 | $message->subject($count.' job listings found especially for you') |
| 51 | 51 | ->greeting('Hello,') |
| 52 | 52 | ->line('We found the following jobs that we think you\'ll be interested in based on your search:'); |
@@ -29,7 +29,7 @@ |
||
| 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 | { |
@@ -1,9 +1,9 @@ |
||
| 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 TokenGenerated extends Notification implements ShouldQueue |
@@ -4,9 +4,9 @@ |
||
| 4 | 4 | { |
| 5 | 5 | public function confirm($token = null); |
| 6 | 6 | |
| 7 | - public function create($data = []); |
|
| 7 | + public function create($data = [ ]); |
|
| 8 | 8 | |
| 9 | - public function getById($id = null, $options = []); |
|
| 9 | + public function getById($id = null, $options = [ ]); |
|
| 10 | 10 | |
| 11 | - public function update($id = null, $data = []); |
|
| 11 | + public function update($id = null, $data = [ ]); |
|
| 12 | 12 | } |
@@ -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,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('tokens', function (Blueprint $table) { |
|
| 16 | + Schema::create('tokens', function(Blueprint $table) { |
|
| 17 | 17 | $table->string('token'); |
| 18 | 18 | $table->primary('token'); |
| 19 | 19 | $table->string('type'); |
@@ -2,9 +2,8 @@ |
||
| 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\Token; |
| 7 | -use Illuminate\Support\Facades\DB; |
|
| 6 | +use JobApis\JobsToMail\Models\User; |
|
| 8 | 7 | |
| 9 | 8 | class TestingDatabaseSeeder extends Seeder |
| 10 | 9 | { |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | private function createActiveUsers($num = 10) |
| 20 | 20 | { |
| 21 | - foreach(range(1, $num) as $index) |
|
| 21 | + foreach (range(1, $num) as $index) |
|
| 22 | 22 | { |
| 23 | 23 | $user = User::create([ |
| 24 | 24 | 'email' => $this->faker->email(), |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | 'confirmed_at' => $this->faker->dateTimeThisYear(), |
| 28 | 28 | ]); |
| 29 | 29 | Token::create([ |
| 30 | - 'user_id' => $user['id'], |
|
| 30 | + 'user_id' => $user[ 'id' ], |
|
| 31 | 31 | 'type' => 'confirm', |
| 32 | 32 | ]); |
| 33 | 33 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | private function createDeletedUsers($num = 10) |
| 37 | 37 | { |
| 38 | - foreach(range(1, $num) as $index) |
|
| 38 | + foreach (range(1, $num) as $index) |
|
| 39 | 39 | { |
| 40 | 40 | $user = User::create([ |
| 41 | 41 | 'email' => $this->faker->email(), |
@@ -45,11 +45,11 @@ discard block |
||
| 45 | 45 | 'deleted_at' => $this->faker->dateTimeThisYear(), |
| 46 | 46 | ]); |
| 47 | 47 | Token::create([ |
| 48 | - 'user_id' => $user['id'], |
|
| 48 | + 'user_id' => $user[ 'id' ], |
|
| 49 | 49 | 'type' => 'confirm', |
| 50 | 50 | ]); |
| 51 | 51 | Token::create([ |
| 52 | - 'user_id' => $user['id'], |
|
| 52 | + 'user_id' => $user[ 'id' ], |
|
| 53 | 53 | 'type' => 'unsubscribe', |
| 54 | 54 | ]); |
| 55 | 55 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | private function createUnconfirmedUsers($num = 10) |
| 59 | 59 | { |
| 60 | - foreach(range(1, $num) as $index) |
|
| 60 | + foreach (range(1, $num) as $index) |
|
| 61 | 61 | { |
| 62 | 62 | $user = User::create([ |
| 63 | 63 | 'email' => $this->faker->email(), |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | 'location' => $this->faker->word().', '.$this->faker->word(), |
| 66 | 66 | ]); |
| 67 | 67 | Token::create([ |
| 68 | - 'user_id' => $user['id'], |
|
| 68 | + 'user_id' => $user[ 'id' ], |
|
| 69 | 69 | 'type' => 'confirm', |
| 70 | 70 | ]); |
| 71 | 71 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -$factory->define(JobApis\JobsToMail\User::class, function (Faker\Generator $faker) { |
|
| 14 | +$factory->define(JobApis\JobsToMail\User::class, function(Faker\Generator $faker) { |
|
| 15 | 15 | static $password; |
| 16 | 16 | |
| 17 | 17 | return [ |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('users', function (Blueprint $table) { |
|
| 16 | + Schema::create('users', function(Blueprint $table) { |
|
| 17 | 17 | $table->uuid('id'); |
| 18 | 18 | $table->primary('id'); |
| 19 | 19 | $table->string('email')->index(); |
@@ -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 | { |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | $uri = urldecode( |
| 11 | - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) |
|
| 11 | + parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH) |
|
| 12 | 12 | ); |
| 13 | 13 | |
| 14 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the |
@@ -112,6 +112,6 @@ |
||
| 112 | 112 | | |
| 113 | 113 | */ |
| 114 | 114 | |
| 115 | - 'attributes' => [], |
|
| 115 | + 'attributes' => [ ], |
|
| 116 | 116 | |
| 117 | 117 | ]; |
@@ -1,12 +1,12 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (! empty($greeting)) { |
|
| 3 | +if (!empty($greeting)) { |
|
| 4 | 4 | echo $greeting, "\n\n"; |
| 5 | 5 | } else { |
| 6 | 6 | echo $level == 'error' ? 'Whoops!' : 'Hello!', "\n\n"; |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -if (! empty($introLines)) { |
|
| 9 | +if (!empty($introLines)) { |
|
| 10 | 10 | echo implode("\n", $introLines), "\n\n"; |
| 11 | 11 | } |
| 12 | 12 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | echo "{$actionText}: {$actionUrl}", "\n\n"; |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | -if (! empty($outroLines)) { |
|
| 17 | +if (!empty($outroLines)) { |
|
| 18 | 18 | echo implode("\n", $outroLines), "\n\n"; |
| 19 | 19 | } |
| 20 | 20 | |