@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * Determine if the given email address already exists. |
| 76 | 76 | * |
| 77 | 77 | * @param string $email |
| 78 | - * @return bool |
|
| 78 | + * @return boolean|null |
|
| 79 | 79 | * |
| 80 | 80 | * @throws \Dyrynda\Artisan\Exceptions\MakeUserException |
| 81 | 81 | */ |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | * Normalise the given (database) field input value. |
| 113 | 113 | * |
| 114 | 114 | * @param mixed $value |
| 115 | - * @return mixed |
|
| 115 | + * @return boolean|string |
|
| 116 | 116 | */ |
| 117 | 117 | private function normaliseValue($value) |
| 118 | 118 | { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Exception; |
| 6 | 6 | use Illuminate\Console\Command; |
| 7 | -use Illuminate\Support\Facades\DB; |
|
| 8 | 7 | use Illuminate\Support\Facades\Password; |
| 9 | 8 | use Dyrynda\Artisan\Exceptions\MakeUserException; |
| 10 | 9 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $name = $this->option('name') ?: ''; |
| 42 | 42 | $password = bcrypt($this->option('password') ?: str_random(32)); |
| 43 | 43 | $modelCommand = $this->option('force') ? 'forceCreate' : 'create'; |
| 44 | - $sendReset = ! $this->option('password') || $this->option('send-reset'); |
|
| 44 | + $sendReset = !$this->option('password') || $this->option('send-reset'); |
|
| 45 | 45 | |
| 46 | 46 | try { |
| 47 | 47 | app('db')->beginTransaction(); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | private function validateEmail($email) |
| 83 | 83 | { |
| 84 | - if (! filter_var($email, FILTER_VALIDATE_EMAIL)) { |
|
| 84 | + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { |
|
| 85 | 85 | throw MakeUserException::invalidEmail($email); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | private function additionalFields() |
| 99 | 99 | { |
| 100 | - if (! $this->option('fields')) { |
|
| 100 | + if (!$this->option('fields')) { |
|
| 101 | 101 | return []; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - return collect(explode(',', $this->option('fields')))->mapWithKeys(function ($field) { |
|
| 104 | + return collect(explode(',', $this->option('fields')))->mapWithKeys(function($field) { |
|
| 105 | 105 | list($column, $value) = explode(':', $field); |
| 106 | 106 | |
| 107 | 107 | return [trim($column) => $this->normaliseValue($value)]; |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function register() |
| 11 | 11 | { |
| 12 | - $this->app->singleton('dyrynda.artisan.make.user', function ($app) { |
|
| 12 | + $this->app->singleton('dyrynda.artisan.make.user', function($app) { |
|
| 13 | 13 | return $app->make(MakeUser::class); |
| 14 | 14 | }); |
| 15 | 15 | |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | { |
| 9 | 9 | /** |
| 10 | 10 | * The supplied email is invalid. |
| 11 | - |
|
| 12 | 11 | * @param string $email |
| 13 | 12 | * @return \Dyrynda\Artisan\Exceptions\MakeUserException |
| 14 | 13 | */ |