@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $response = Dispatcher::run( |
37 | 37 | [ |
38 | 38 | new Authentication, |
39 | - function ($request, $next) { |
|
39 | + function($request, $next) { |
|
40 | 40 | $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token')); |
41 | 41 | $this->assertEquals(true, \is_array($request->getAttribute('ncryptf-user'))); |
42 | 42 | return $next->handle($request); |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | ->withHeader('Authorization', $auth->getHeader()) |
47 | 47 | ->withHeader('Content-Type', 'application/json') |
48 | 48 | ->withHeader('Accept', 'application/json') |
49 | - ->withBody((function () use ($params) { |
|
49 | + ->withBody((function() use ($params) { |
|
50 | 50 | $stream = fopen('php://memory', 'r+'); |
51 | - fwrite($stream, \is_array($params[2]) ? \json_encode($params[2]): $params[2]); |
|
51 | + fwrite($stream, \is_array($params[2]) ? \json_encode($params[2]) : $params[2]); |
|
52 | 52 | rewind($stream); |
53 | 53 | return new \Zend\Diactoros\Stream($stream); |
54 | 54 | })()) |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | [ |
74 | 74 | new RequestParser($cache), |
75 | 75 | new Authentication, |
76 | - function ($request, $next) use ($params) { |
|
76 | + function($request, $next) use ($params) { |
|
77 | 77 | $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token')); |
78 | 78 | $this->assertEquals(true, \is_array($request->getAttribute('ncryptf-user'))); |
79 | 79 | return $next->handle($request); |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | ->withHeader('Accept', 'application/vnd.ncryptf+json') |
88 | 88 | ->withHeader('X-HashId', $serverKey->getHashIdentifier()) |
89 | 89 | ->withHeader('X-PubKey', \base64_encode($myKey->getBoxPublicKey())) |
90 | - ->withBody((function () use ($params, $serverKey, $myKey, $token) { |
|
91 | - $data = \is_array($params[2]) ? \json_encode($params[2]): $params[2]; |
|
90 | + ->withBody((function() use ($params, $serverKey, $myKey, $token) { |
|
91 | + $data = \is_array($params[2]) ? \json_encode($params[2]) : $params[2]; |
|
92 | 92 | |
93 | 93 | if (!empty($params[2])) { |
94 | 94 | $request = new Request( |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | [ |
139 | 139 | new RequestParser($cache), |
140 | 140 | new Authentication, |
141 | - function ($request, $next) { |
|
141 | + function($request, $next) { |
|
142 | 142 | $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token')); |
143 | 143 | $this->assertEquals(true, \is_array($request->getAttribute('ncryptf-user'))); |
144 | 144 | return $next->handle($request); |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | ->withHeader('X-HashId', $serverKey->getHashIdentifier()) |
154 | 154 | ->withHeader('X-Nonce', \base64_encode($nonce)) |
155 | 155 | ->withHeader('X-PubKey', \base64_encode($myKey->getBoxPublicKey())) |
156 | - ->withBody((function () use ($params, $serverKey, $myKey, $nonce, $token) { |
|
157 | - $data = \is_array($params[2]) ? \json_encode($params[2]): $params[2]; |
|
156 | + ->withBody((function() use ($params, $serverKey, $myKey, $nonce, $token) { |
|
157 | + $data = \is_array($params[2]) ? \json_encode($params[2]) : $params[2]; |
|
158 | 158 | |
159 | 159 | $request = new Request( |
160 | 160 | $myKey->getBoxSecretKey(), |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $response = Dispatcher::run( |
206 | 206 | [ |
207 | 207 | new Authentication, |
208 | - function ($request, $next) { |
|
208 | + function($request, $next) { |
|
209 | 209 | return new JsonResponse(['foo' => 'bar']); |
210 | 210 | } |
211 | 211 | ], |