@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | if (password_needs_rehash( |
| 97 | 97 | $password, |
| 98 | - $this->config[ 'password' ][ 'algorithm' ], |
|
| 99 | - $this->config[ 'password' ][ 'options' ] |
|
| 98 | + $this->config['password']['algorithm'], |
|
| 99 | + $this->config['password']['options'] |
|
| 100 | 100 | )) { |
| 101 | 101 | return $this->passwordHash($password); |
| 102 | 102 | } |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | { |
| 118 | 118 | return password_hash( |
| 119 | 119 | $password, |
| 120 | - $this->config[ 'password' ][ 'algorithm' ], |
|
| 121 | - $this->config[ 'password' ][ 'options' ] |
|
| 120 | + $this->config['password']['algorithm'], |
|
| 121 | + $this->config['password']['options'] |
|
| 122 | 122 | ); |
| 123 | 123 | } |
| 124 | 124 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function attempt() |
| 146 | 146 | { |
| 147 | - $_SESSION[ 'userAttempts' ] = $this->getAttempts() + 1; |
|
| 147 | + $_SESSION['userAttempts'] = $this->getAttempts() + 1; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | // ------------------------------------------------------------------------ |
@@ -157,8 +157,8 @@ discard block |
||
| 157 | 157 | public function getAttempts() |
| 158 | 158 | { |
| 159 | 159 | $currentAttempts = 0; |
| 160 | - if (isset($_SESSION[ 'userAttempts' ])) { |
|
| 161 | - $currentAttempts = (int)$_SESSION[ 'userAttempts' ]; |
|
| 160 | + if (isset($_SESSION['userAttempts'])) { |
|
| 161 | + $currentAttempts = (int)$_SESSION['userAttempts']; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | return (int)$currentAttempts; |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function login(array $account) |
| 175 | 175 | { |
| 176 | - $_SESSION[ 'account' ] = $account; |
|
| 177 | - unset($_SESSION[ 'userAttempts' ]); |
|
| 176 | + $_SESSION['account'] = $account; |
|
| 177 | + unset($_SESSION['userAttempts']); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | // ------------------------------------------------------------------------ |
@@ -223,12 +223,12 @@ discard block |
||
| 223 | 223 | */ |
| 224 | 224 | public function loggedIn() |
| 225 | 225 | { |
| 226 | - if (isset($_SESSION[ 'account' ])) { |
|
| 226 | + if (isset($_SESSION['account'])) { |
|
| 227 | 227 | return true; |
| 228 | 228 | } elseif ($this->signedOn()) { |
| 229 | 229 | $cacheItemPool = $this->getCacheItemPool(); |
| 230 | 230 | $item = $cacheItemPool->getItem('sso-' . input()->cookie('ssid')); |
| 231 | - $_SESSION[ 'account' ] = $item->get(); |
|
| 231 | + $_SESSION['account'] = $item->get(); |
|
| 232 | 232 | |
| 233 | 233 | return true; |
| 234 | 234 | } |
@@ -264,8 +264,8 @@ discard block |
||
| 264 | 264 | { |
| 265 | 265 | $this->signOff(); |
| 266 | 266 | |
| 267 | - if (isset($_SESSION[ 'account' ])) { |
|
| 268 | - unset($_SESSION[ 'account' ]); |
|
| 267 | + if (isset($_SESSION['account'])) { |
|
| 268 | + unset($_SESSION['account']); |
|
| 269 | 269 | } |
| 270 | 270 | } |
| 271 | 271 | |