@@ -124,15 +124,15 @@ |
||
| 124 | 124 | */ |
| 125 | 125 | public function getActiveSession(): SessionInterface |
| 126 | 126 | { |
| 127 | - try { |
|
| 127 | + try{ |
|
| 128 | 128 | $request = $this->container->get(ServerRequestInterface::class); |
| 129 | 129 | $session = $request->getAttribute(SessionMiddleware::ATTRIBUTE); |
| 130 | - if ($session === null) { |
|
| 130 | + if ($session === null){ |
|
| 131 | 131 | throw new ScopeException('Unable to receive active Session, invalid request scope'); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | return $session; |
| 135 | - } catch (NotFoundExceptionInterface $e) { |
|
| 135 | + }catch (NotFoundExceptionInterface $e){ |
|
| 136 | 136 | throw new ScopeException('Unable to receive active session', $e->getCode(), $e); |
| 137 | 137 | } |
| 138 | 138 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | public function testHasCookie(): void |
| 37 | 37 | { |
| 38 | - $this->http->setHandler(function () { |
|
| 38 | + $this->http->setHandler(function (){ |
|
| 39 | 39 | return (int)$this->cookies()->has('a'); |
| 40 | 40 | }); |
| 41 | 41 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | ]); |
| 54 | 54 | $this->http = $this->app->get(Http::class); |
| 55 | 55 | |
| 56 | - $this->http->setHandler(function () { |
|
| 56 | + $this->http->setHandler(function (){ |
|
| 57 | 57 | return (int)$this->cookies()->has('a'); |
| 58 | 58 | }); |
| 59 | 59 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]); |
| 71 | 71 | $this->http = $this->app->get(Http::class); |
| 72 | 72 | |
| 73 | - $this->http->setHandler(function () { |
|
| 73 | + $this->http->setHandler(function (){ |
|
| 74 | 74 | return $this->cookies()->get('a'); |
| 75 | 75 | }); |
| 76 | 76 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]); |
| 88 | 88 | $this->http = $this->app->get(Http::class); |
| 89 | 89 | |
| 90 | - $this->http->setHandler(function () { |
|
| 90 | + $this->http->setHandler(function (){ |
|
| 91 | 91 | $this->cookies()->set('a', 'value'); |
| 92 | 92 | |
| 93 | 93 | return 'ok'; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]); |
| 112 | 112 | $this->http = $this->app->get(Http::class); |
| 113 | 113 | |
| 114 | - $this->http->setHandler(function () { |
|
| 114 | + $this->http->setHandler(function (){ |
|
| 115 | 115 | $this->cookies()->schedule(Cookie::create('a', 'value')); |
| 116 | 116 | $this->assertSame([], $this->cookies()->getAll()); |
| 117 | 117 | |