Completed
Branch master (0ffe7f)
by John
04:32
created
src/ParameterAssembler.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 namespace KleijnWeb\PhpApi\Middleware;
9 9
 
10 10
 use Interop\Http\ServerMiddleware\DelegateInterface;
11
-use KleijnWeb\PhpApi\Middleware\Body\BodyParser;
12 11
 use KleijnWeb\PhpApi\Middleware\Util\PhpApiMiddleware;
13 12
 use KleijnWeb\PhpApi\Descriptions\Request\RequestParameterAssembler;
14 13
 use Psr\Http\Message\ResponseInterface;
Please login to merge, or discard this patch.
example/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.