@@ -89,12 +89,12 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $response = $this->client->request('login', compact('email', 'password', 'remember')); |
| 91 | 91 | |
| 92 | - if(!$this->client->success(true)) { |
|
| 92 | + if (!$this->client->success(true)) { |
|
| 93 | 93 | $this->lastError = array_get($response, 'message'); |
| 94 | 94 | return false; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - if(!$this->token = $this->client->getToken()) { |
|
| 97 | + if (!$this->token = $this->client->getToken()) { |
|
| 98 | 98 | return false; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | { |
| 122 | 122 | $this->client->request('unsafeLogin', compact('email', 'remember')); |
| 123 | 123 | |
| 124 | - if(!$this->client->success()) { |
|
| 124 | + if (!$this->client->success()) { |
|
| 125 | 125 | return false; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - if(!$this->token = $this->client->getToken()) { |
|
| 128 | + if (!$this->token = $this->client->getToken()) { |
|
| 129 | 129 | return false; |
| 130 | 130 | } |
| 131 | 131 | |
@@ -144,13 +144,13 @@ discard block |
||
| 144 | 144 | // If we've already retrieved the user for the current request we can just |
| 145 | 145 | // return it back immediately. We do not want to fetch the user data on |
| 146 | 146 | // every call to this method because that would be tremendously slow. |
| 147 | - if (! is_null($this->user)) { |
|
| 147 | + if (!is_null($this->user)) { |
|
| 148 | 148 | return $this->user; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | $user = null; |
| 152 | 152 | |
| 153 | - if($token = $this->token()) { |
|
| 153 | + if ($token = $this->token()) { |
|
| 154 | 154 | $user = $this->retrieveUserFromToken($token); |
| 155 | 155 | } |
| 156 | 156 | |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | public function token() |
| 166 | 166 | { |
| 167 | - if($this->token) { |
|
| 167 | + if ($this->token) { |
|
| 168 | 168 | return $this->token; |
| 169 | 169 | } |
| 170 | 170 | |
@@ -213,13 +213,13 @@ discard block |
||
| 213 | 213 | { |
| 214 | 214 | $data = (array) \Firebase\JWT\JWT::decode($token, env('JWT_SECRET'), ['HS256']); |
| 215 | 215 | } |
| 216 | - catch(\RuntimeException $e) { |
|
| 216 | + catch (\RuntimeException $e) { |
|
| 217 | 217 | $this->logout(); |
| 218 | 218 | |
| 219 | 219 | return null; |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | - if(!$userId = array_get($data, 'userId')) { |
|
| 222 | + if (!$userId = array_get($data, 'userId')) { |
|
| 223 | 223 | return null; |
| 224 | 224 | } |
| 225 | 225 | |