Passed
Push — master ( 149dd5...081af3 )
by Charles
02:27
created
tests/RequestResponseTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 [
148 148
                     new RequestParser($cache),
149 149
                     new Authentication,
150
-                    function ($request, $next) use ($params) {
150
+                    function($request, $next) use ($params) {
151 151
                         $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token'));
152 152
                         $this->assertEquals(true, \is_array($request->getAttribute('ncryptf-user')));
153 153
                         return $next->handle($request);
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
                     ->withHeader('Accept', 'application/vnd.ncryptf+json')
162 162
                     ->withHeader('X-HashId', $serverKey->getHashIdentifier())
163 163
                     ->withHeader('X-PubKey', \base64_encode($myKey->getBoxPublicKey()))
164
-                    ->withBody((function () use ($params, $serverKey, $myKey, $token) {
165
-                        $data = \is_array($params[2]) ? \json_encode($params[2]): $params[2];
164
+                    ->withBody((function() use ($params, $serverKey, $myKey, $token) {
165
+                        $data = \is_array($params[2]) ? \json_encode($params[2]) : $params[2];
166 166
  
167 167
                         if (!empty($params[2])) {
168 168
                             $request = new Request(
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 [
213 213
                     new RequestParser($cache),
214 214
                     new Authentication,
215
-                    function ($request, $next) {
215
+                    function($request, $next) {
216 216
                         $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token'));
217 217
                         $this->assertEquals(true, \is_array($request->getAttribute('ncryptf-user')));
218 218
                         return $next->handle($request);
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
                     ->withHeader('X-HashId', $serverKey->getHashIdentifier())
228 228
                     ->withHeader('X-Nonce', \base64_encode($nonce))
229 229
                     ->withHeader('X-PubKey', \base64_encode($myKey->getBoxPublicKey()))
230
-                    ->withBody((function () use ($params, $serverKey, $myKey, $nonce, $token) {
231
-                        $data = \is_array($params[2]) ? \json_encode($params[2]): $params[2];
230
+                    ->withBody((function() use ($params, $serverKey, $myKey, $nonce, $token) {
231
+                        $data = \is_array($params[2]) ? \json_encode($params[2]) : $params[2];
232 232
 
233 233
                         $request = new Request(
234 234
                             $myKey->getBoxSecretKey(),
Please login to merge, or discard this patch.
tests/AuthenticationTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             $response = Dispatcher::run(
34 34
                 [
35 35
                     new Authentication,
36
-                    function ($request, $next) {
36
+                    function($request, $next) {
37 37
                         $this->assertInstanceOf('\ncryptf\Token', $request->getAttribute('ncryptf-token'));
38 38
                         $this->assertEquals(true, \is_array($request->getAttribute('ncryptf-user')));
39 39
                         return $next->handle($request);
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
                     ->withHeader('Authorization', $auth->getHeader())
44 44
                     ->withHeader('Content-Type', 'application/json')
45 45
                     ->withHeader('Accept', 'application/json')
46
-                    ->withBody((function () use ($params) {
46
+                    ->withBody((function() use ($params) {
47 47
                         $stream = fopen('php://memory', 'r+');
48
-                        fwrite($stream, \is_array($params[2]) ? \json_encode($params[2]): $params[2]);
48
+                        fwrite($stream, \is_array($params[2]) ? \json_encode($params[2]) : $params[2]);
49 49
                         rewind($stream);
50 50
                         return new \Zend\Diactoros\Stream($stream);
51 51
                     })())
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $response = Dispatcher::run(
62 62
             [
63 63
                 new Authentication,
64
-                function ($request, $next) {
64
+                function($request, $next) {
65 65
                     return new JsonResponse(['foo' => 'bar']);
66 66
                 }
67 67
             ],
Please login to merge, or discard this patch.