@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $tokenObject = $this->getUnexpiredConfirmationToken($token); |
| 41 | 41 | if ($tokenObject) { |
| 42 | - if ($this->update($tokenObject->user_id, ['confirmed_at' => Carbon::now()])) { |
|
| 42 | + if ($this->update($tokenObject->user_id, [ 'confirmed_at' => Carbon::now() ])) { |
|
| 43 | 43 | return true; |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * |
| 54 | 54 | * @return \JobApis\JobsToMail\Models\User |
| 55 | 55 | */ |
| 56 | - public function create($data = []) |
|
| 56 | + public function create($data = [ ]) |
|
| 57 | 57 | { |
| 58 | 58 | // Create the user |
| 59 | 59 | if ($user = $this->users->create($data)) { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * @return \JobApis\JobsToMail\Models\User |
| 75 | 75 | */ |
| 76 | - public function getById($id = null, $options = []) |
|
| 76 | + public function getById($id = null, $options = [ ]) |
|
| 77 | 77 | { |
| 78 | 78 | return $this->users->where('id', $id)->first(); |
| 79 | 79 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * |
| 97 | 97 | * @return boolean |
| 98 | 98 | */ |
| 99 | - public function update($id = null, $data = []) |
|
| 99 | + public function update($id = null, $data = [ ]) |
|
| 100 | 100 | { |
| 101 | 101 | return $this->users->where('id', $id)->update($data); |
| 102 | 102 | } |
@@ -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 | } |
@@ -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('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'); |
@@ -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(); |
@@ -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 | } |
@@ -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 | |