@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $this->setSaveHandler($handler); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - $this->lifetime = (int)ini_get('session.gc_maxlifetime'); |
|
| 106 | + $this->lifetime = (int) ini_get('session.gc_maxlifetime'); |
|
| 107 | 107 | $this->isCLI = (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg'); |
| 108 | 108 | |
| 109 | 109 | session_register_shutdown(); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $result = false; |
| 187 | 187 | |
| 188 | 188 | $checkTime = $time !== null && $this->lifetime > 0; |
| 189 | - if ($checkTime && (time() - (int)$time > $this->lifetime)) { |
|
| 189 | + if ($checkTime && (time() - (int) $time > $this->lifetime)) { |
|
| 190 | 190 | $result = true; |
| 191 | 191 | } |
| 192 | 192 | |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | */ |
| 330 | 330 | public function getId(): string |
| 331 | 331 | { |
| 332 | - return (string)session_id(); |
|
| 332 | + return (string) session_id(); |
|
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | /** |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | $result = false; |
| 487 | 487 | |
| 488 | 488 | $checkTime = $time !== null && $this->lifetime > 0; |
| 489 | - if ($checkTime && (time() - (int)$time > $this->lifetime)) { |
|
| 489 | + if ($checkTime && (time() - (int) $time > $this->lifetime)) { |
|
| 490 | 490 | $result = true; |
| 491 | 491 | } |
| 492 | 492 | |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | $array[$key] = []; |
| 539 | 539 | } |
| 540 | 540 | |
| 541 | - $array =& $array[$key]; |
|
| 541 | + $array = & $array[$key]; |
|
| 542 | 542 | } |
| 543 | 543 | |
| 544 | 544 | $array[array_shift($keys)] = $value; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $instance = new static(); |
| 25 | 25 | |
| 26 | 26 | foreach ($array as $key => $value) { |
| 27 | - $method = 'set' . $key; |
|
| 27 | + $method = 'set'.$key; |
|
| 28 | 28 | if (method_exists($instance, $method)) { |
| 29 | 29 | $instance->{$method}($value); |
| 30 | 30 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function cookieHttpOnly(): bool |
| 90 | 90 | { |
| 91 | - return (bool)ini_get('session.cookie_httponly'); |
|
| 91 | + return (bool) ini_get('session.cookie_httponly'); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | */ |
| 169 | 169 | public function useTransSid(): bool |
| 170 | 170 | { |
| 171 | - return (bool)ini_get('session.use_trans_sid'); |
|
| 171 | + return (bool) ini_get('session.use_trans_sid'); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | public function gcLifeTime(): int |
| 220 | 220 | { |
| 221 | - return (int)ini_get('session.gc_maxlifetime') / 60; |
|
| 221 | + return (int) ini_get('session.gc_maxlifetime') / 60; |
|
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | /** |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | public function iniSet(string $setting, $value) |
| 228 | 228 | { |
| 229 | - $result = ini_set($setting, (string)$value); |
|
| 229 | + $result = ini_set($setting, (string) $value); |
|
| 230 | 230 | if ($result === false) { |
| 231 | 231 | throw new RuntimeException(sprintf('Could not set `%s`', $setting)); |
| 232 | 232 | } |