@@ -17,10 +17,10 @@ discard block |
||
| 17 | 17 | $cache = new ApcuCache(); |
| 18 | 18 | |
| 19 | 19 | $commands = [ |
| 20 | - '/pets/{id}:get' => function (int $id) use ($cache): Pet { |
|
| 20 | + '/pets/{id}:get' => function(int $id) use ($cache): Pet { |
|
| 21 | 21 | return unserialize($cache->fetch($id)); |
| 22 | 22 | }, |
| 23 | - '/pets:post' => function (Pet $pet) use ($cache) { |
|
| 23 | + '/pets:post' => function(Pet $pet) use ($cache) { |
|
| 24 | 24 | $count = $cache->fetch('count'); |
| 25 | 25 | $pet->setId($id = $count + 1); |
| 26 | 26 | $cache->save($id, serialize($pet)); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $request = ServerRequestFactory::fromGlobals($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES); |
| 43 | 43 | |
| 44 | - $response = $pipe->dispatch($request, function () { |
|
| 44 | + $response = $pipe->dispatch($request, function() { |
|
| 45 | 45 | return Factory::createResponse(500); |
| 46 | 46 | }); |
| 47 | 47 | |