Completed
Branch master (ec3ffa)
by Michael
06:45
created
src/Console/Commands/MakeUser.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)];
Please login to merge, or discard this patch.
src/MakeUserServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Exceptions/MakeUserException.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.