@@ -7,4 +7,4 @@ |
||
7 | 7 | * @author Julián Gutiérrez <[email protected]> |
8 | 8 | */ |
9 | 9 | |
10 | -require __DIR__ . '/../vendor/autoload.php'; |
|
10 | +require __DIR__.'/../vendor/autoload.php'; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | $savePathParts = explode(DIRECTORY_SEPARATOR, rtrim($savePath, DIRECTORY_SEPARATOR)); |
220 | 220 | if ($this->sessionName !== 'PHPSESSID' && $this->sessionName !== array_pop($savePathParts)) { |
221 | - $savePath .= DIRECTORY_SEPARATOR . $this->sessionName; |
|
221 | + $savePath .= DIRECTORY_SEPARATOR.$this->sessionName; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | if ($savePath !== sys_get_temp_dir() |
@@ -372,11 +372,11 @@ discard block |
||
372 | 372 | ]; |
373 | 373 | |
374 | 374 | if (trim($this->getSessionSetting('cookie_path')) !== '') { |
375 | - $cookieParams[] = 'path=' . $this->getSessionSetting('cookie_path'); |
|
375 | + $cookieParams[] = 'path='.$this->getSessionSetting('cookie_path'); |
|
376 | 376 | } |
377 | 377 | |
378 | 378 | if (trim($this->getSessionSetting('cookie_domain')) !== '') { |
379 | - $cookieParams[] = 'domain=' . $this->getSessionSetting('cookie_domain'); |
|
379 | + $cookieParams[] = 'domain='.$this->getSessionSetting('cookie_domain'); |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | if ((bool) $this->getSessionSetting('cookie_secure')) { |
@@ -455,6 +455,6 @@ discard block |
||
455 | 455 | */ |
456 | 456 | private function normalizeSessionSettingName($setting) |
457 | 457 | { |
458 | - return strpos($setting, 'session.') !== 0 ? 'session.' . $setting : $setting; |
|
458 | + return strpos($setting, 'session.') !== 0 ? 'session.'.$setting : $setting; |
|
459 | 459 | } |
460 | 460 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $this->request = ServerRequestFactory::fromGlobals(); |
51 | 51 | $this->response = new Response; |
52 | - $this->callback = function ($request, $response) { |
|
52 | + $this->callback = function($request, $response) { |
|
53 | 53 | return $response; |
54 | 54 | }; |
55 | 55 | } |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | $middleware = new SessionWare(['name' => 'SessionWareSession', 'timeoutKey' => '__TIMEOUT__']); |
80 | 80 | |
81 | 81 | $sessionHolder = new \stdClass(); |
82 | - $middleware->addListener('pre.session_timeout', function ($sessionId) use ($sessionHolder) { |
|
82 | + $middleware->addListener('pre.session_timeout', function($sessionId) use ($sessionHolder) { |
|
83 | 83 | $sessionHolder->id = $sessionId; |
84 | 84 | }); |
85 | 85 | |
86 | 86 | $assert = $this; |
87 | - $middleware->addListener('post.session_timeout', function ($sessionId) use ($assert, $sessionHolder) { |
|
87 | + $middleware->addListener('post.session_timeout', function($sessionId) use ($assert, $sessionHolder) { |
|
88 | 88 | $assert::assertNotNull($sessionHolder->id); |
89 | 89 | $assert::assertNotEquals($sessionHolder->id, $sessionId); |
90 | 90 | }); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $middleware($this->request, $this->response, $this->callback); |
199 | 199 | |
200 | 200 | self::assertEquals(PHP_SESSION_ACTIVE, session_status()); |
201 | - self::assertTrue(is_dir(sys_get_temp_dir() . '/SessionWareSession')); |
|
201 | + self::assertTrue(is_dir(sys_get_temp_dir().'/SessionWareSession')); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function testSessionSavePathFromFunction() |
208 | 208 | { |
209 | - $tmpPath = sys_get_temp_dir() . '/SessionWareSession'; |
|
209 | + $tmpPath = sys_get_temp_dir().'/SessionWareSession'; |
|
210 | 210 | |
211 | 211 | session_save_path($tmpPath); |
212 | 212 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | */ |
224 | 224 | public function testSessionSavePathFromParameter() |
225 | 225 | { |
226 | - $tmpPath = sys_get_temp_dir() . '/SessionWareSession'; |
|
226 | + $tmpPath = sys_get_temp_dir().'/SessionWareSession'; |
|
227 | 227 | |
228 | 228 | $middleware = new SessionWare(['name' => 'SessionWareSession', 'savePath' => $tmpPath]); |
229 | 229 | |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | $response = $middleware( |
380 | 380 | $this->request, |
381 | 381 | $this->response, |
382 | - function ($request, $response) { |
|
382 | + function($request, $response) { |
|
383 | 383 | $_SESSION = []; |
384 | 384 | |
385 | 385 | // Serialization is not allowed in PHPUnit running on a separate process |