@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | [ |
146 | 146 | new JsonRequestParser($cache), |
147 | 147 | new Authentication, |
148 | - function ($request, $next) use ($params) { |
|
148 | + function($request, $next) use ($params) { |
|
149 | 149 | $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token')); |
150 | 150 | $this->assertEquals(true, \is_array($request->getAttribute('ncryptf-user'))); |
151 | 151 | return $next->handle($request); |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | ->withHeader('Accept', 'application/vnd.ncryptf+json') |
160 | 160 | ->withHeader('X-HashId', $serverKey->getHashIdentifier()) |
161 | 161 | ->withHeader('X-PubKey', \base64_encode($myKey->getBoxPublicKey())) |
162 | - ->withBody((function () use ($params, $serverKey, $myKey, $token) { |
|
163 | - $data = \is_array($params[2]) ? \json_encode($params[2]): $params[2]; |
|
162 | + ->withBody((function() use ($params, $serverKey, $myKey, $token) { |
|
163 | + $data = \is_array($params[2]) ? \json_encode($params[2]) : $params[2]; |
|
164 | 164 | |
165 | 165 | if (!empty($params[2])) { |
166 | 166 | $request = new Request( |
@@ -218,8 +218,8 @@ discard block |
||
218 | 218 | ->withHeader('Accept', 'application/vnd.ncryptf+json') |
219 | 219 | ->withHeader('X-HashId', $serverKey->getHashIdentifier()) |
220 | 220 | ->withHeader('X-PubKey', \base64_encode($myKey->getBoxPublicKey())) |
221 | - ->withBody((function () use ($params, $serverKey, $myKey, $token) { |
|
222 | - $data = \is_array($params[2]) ? \json_encode($params[2]): $params[2]; |
|
221 | + ->withBody((function() use ($params, $serverKey, $myKey, $token) { |
|
222 | + $data = \is_array($params[2]) ? \json_encode($params[2]) : $params[2]; |
|
223 | 223 | |
224 | 224 | if (!empty($params[2])) { |
225 | 225 | $request = new Request( |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | [ |
270 | 270 | new JsonRequestParser($cache), |
271 | 271 | new Authentication, |
272 | - function ($request, $next) { |
|
272 | + function($request, $next) { |
|
273 | 273 | $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token')); |
274 | 274 | $this->assertEquals(true, \is_array($request->getAttribute('ncryptf-user'))); |
275 | 275 | return $next->handle($request); |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | ->withHeader('X-HashId', $serverKey->getHashIdentifier()) |
285 | 285 | ->withHeader('X-Nonce', \base64_encode($nonce)) |
286 | 286 | ->withHeader('X-PubKey', \base64_encode($myKey->getBoxPublicKey())) |
287 | - ->withBody((function () use ($params, $serverKey, $myKey, $nonce, $token) { |
|
288 | - $data = \is_array($params[2]) ? \json_encode($params[2]): $params[2]; |
|
287 | + ->withBody((function() use ($params, $serverKey, $myKey, $nonce, $token) { |
|
288 | + $data = \is_array($params[2]) ? \json_encode($params[2]) : $params[2]; |
|
289 | 289 | |
290 | 290 | $request = new Request( |
291 | 291 | $myKey->getBoxSecretKey(), |