@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | $response = $http->handle(new ServerRequest('GET', '', ['X-Auth-Token' => $token], 'php://input')); |
34 | 34 | |
35 | - $this->assertSame('OK', (string) $response->getBody()); |
|
35 | + $this->assertSame('OK', (string)$response->getBody()); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -54,6 +54,6 @@ discard block |
||
54 | 54 | $this->expectException(AuthException::class); |
55 | 55 | $response = $http->handle(new ServerRequest('GET', '', ['X-Auth-Token' => $token], 'php://input')); |
56 | 56 | |
57 | - $this->assertSame('OK', (string) $response->getBody()); |
|
57 | + $this->assertSame('OK', (string)$response->getBody()); |
|
58 | 58 | } |
59 | 59 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | $this->assertSame(302, $response->getStatusCode()); |
62 | 62 | $this->assertSame(['Location' => ['/login']], $response->getHeaders()); |
63 | - $this->assertSame('', (string) $response->getBody()); |
|
63 | + $this->assertSame('', (string)$response->getBody()); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -85,6 +85,6 @@ discard block |
||
85 | 85 | |
86 | 86 | $this->assertSame(301, $response->getStatusCode()); |
87 | 87 | $this->assertSame(['Location' => ['/login']], $response->getHeaders()); |
88 | - $this->assertSame('', (string) $response->getBody()); |
|
88 | + $this->assertSame('', (string)$response->getBody()); |
|
89 | 89 | } |
90 | 90 | } |
@@ -34,6 +34,6 @@ |
||
34 | 34 | new ServerRequest('GET', new Uri('/admin'), ['X-Auth-Token' => $token], 'php://input') |
35 | 35 | ); |
36 | 36 | |
37 | - $this->assertSame($token === 'ok' ? '/admin' : '/login', (string) $response->getBody()); |
|
37 | + $this->assertSame($token === 'ok' ? '/admin' : '/login', (string)$response->getBody()); |
|
38 | 38 | } |
39 | 39 | } |
@@ -16,11 +16,11 @@ |
||
16 | 16 | protected readonly UriInterface $uri, |
17 | 17 | protected readonly ResponseFactoryInterface $responseFactory, |
18 | 18 | protected readonly int $status = 302 |
19 | - ) { |
|
19 | + ){ |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | protected function denyAccess(Request $request, RequestHandlerInterface $handler): Response |
23 | 23 | { |
24 | - return $this->responseFactory->createResponse($this->status)->withHeader('Location', (string) $this->uri); |
|
24 | + return $this->responseFactory->createResponse($this->status)->withHeader('Location', (string)$this->uri); |
|
25 | 25 | } |
26 | 26 | } |