@@ -88,7 +88,7 @@ |
||
| 88 | 88 | * @param string $accessToken |
| 89 | 89 | * @return \ncryptf\Token |
| 90 | 90 | */ |
| 91 | - abstract protected function getTokenFromAccessToken(string $accessToken) :? Token; |
|
| 91 | + abstract protected function getTokenFromAccessToken(string $accessToken) : ? Token; |
|
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | 94 | * Returns the plaintext request body. If the request is encrypted with vnd.ncryptf+<type> |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | final class MockAuthentication extends AbstractAuthentication |
| 22 | 22 | { |
| 23 | - protected function getTokenFromAccessToken(string $accessToken) :? Token |
|
| 23 | + protected function getTokenFromAccessToken(string $accessToken) : ? Token |
|
| 24 | 24 | { |
| 25 | 25 | // Return a fixed token |
| 26 | 26 | return new Token( |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $auth = new Authorization($params[0], $params[1], $this->token, new DateTime, $params[2]); |
| 47 | 47 | $response = Dispatcher::run([ |
| 48 | 48 | new MockAuthentication, |
| 49 | - function ($request, $next) { |
|
| 49 | + function($request, $next) { |
|
| 50 | 50 | $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token')); |
| 51 | 51 | return $next->handle($request); |
| 52 | 52 | } |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | Factory::createServerRequest($params[0], $params[1]) |
| 55 | 55 | ->withHeader('Authorization', $auth->getHeader()) |
| 56 | 56 | ->withBody((function() use ($params) { |
| 57 | - $stream = fopen('php://memory','r+'); |
|
| 58 | - fwrite($stream, \is_array($params[2]) ? \json_encode($params[2]): $params[2]); |
|
| 57 | + $stream = fopen('php://memory', 'r+'); |
|
| 58 | + fwrite($stream, \is_array($params[2]) ? \json_encode($params[2]) : $params[2]); |
|
| 59 | 59 | rewind($stream); |
| 60 | 60 | |
| 61 | 61 | return new \Zend\Diactoros\Stream($stream); |