@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | { |
30 | 30 | $attributes = is_array($user) ? $user : []; |
31 | 31 | |
32 | - if (! $user instanceof WP_User) { |
|
32 | + if (!$user instanceof WP_User) { |
|
33 | 33 | $user = new WP_User(); |
34 | 34 | } |
35 | 35 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public static function fromID($id) |
51 | 51 | { |
52 | - if (! $user = get_user_by('id', $id)) { |
|
52 | + if (!$user = get_user_by('id', $id)) { |
|
53 | 53 | throw new UserNotFoundException("No user found with ID $id"); |
54 | 54 | } |
55 | 55 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public static function fromUsername($username) |
69 | 69 | { |
70 | - if (! $user = get_user_by('login', $username)) { |
|
70 | + if (!$user = get_user_by('login', $username)) { |
|
71 | 71 | throw new UserNotFoundException("No user found with username: $username"); |
72 | 72 | } |
73 | 73 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public static function fromEmail($email) |
87 | 87 | { |
88 | - if (! $user = get_user_by('email', $email)) { |
|
88 | + if (!$user = get_user_by('email', $email)) { |
|
89 | 89 | throw new UserNotFoundException("No user found with email address: $email"); |
90 | 90 | } |
91 | 91 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public static function fromSlug($slug) |
105 | 105 | { |
106 | - if (! $user = get_user_by('slug', $slug)) { |
|
106 | + if (!$user = get_user_by('slug', $slug)) { |
|
107 | 107 | throw new UserNotFoundException("No user found with slug: $slug"); |
108 | 108 | } |
109 | 109 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function save() |
151 | 151 | { |
152 | - if (! $this->id) { |
|
152 | + if (!$this->id) { |
|
153 | 153 | $result = wp_insert_user($this->object); |
154 | 154 | } else { |
155 | 155 | $result = wp_update_user($this->object); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | 'spam', |
231 | 231 | 'deleted', |
232 | 232 | ])->diff(array_keys((array) $user->data)) |
233 | - ->each(function ($property) use ($user) { |
|
233 | + ->each(function($property) use ($user) { |
|
234 | 234 | $user->data->$property = null; // exists but ! isset |
235 | 235 | }); |
236 | 236 |