@@ -12,10 +12,10 @@ discard block |
||
| 12 | 12 | $cache = new ApcuCache(); |
| 13 | 13 | |
| 14 | 14 | $commands = [ |
| 15 | - '/pets/{id}:get' => function (int $id) use ($cache): Pet { |
|
| 15 | + '/pets/{id}:get' => function(int $id) use ($cache): Pet { |
|
| 16 | 16 | return unserialize($cache->fetch($id)); |
| 17 | 17 | }, |
| 18 | - '/pets:post' => function (Pet $pet) use ($cache) { |
|
| 18 | + '/pets:post' => function(Pet $pet) use ($cache) { |
|
| 19 | 19 | $count = $cache->fetch('count'); |
| 20 | 20 | $pet->setId($id = $count + 1); |
| 21 | 21 | $cache->save($id, serialize($pet)); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | $request = ServerRequestFactory::fromGlobals($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES); |
| 38 | 38 | |
| 39 | -$response = $pipe->dispatch($request, function () { |
|
| 39 | +$response = $pipe->dispatch($request, function() { |
|
| 40 | 40 | return Factory::createResponse(500); |
| 41 | 41 | }); |
| 42 | 42 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | if ($pattern = $schema->getPattern()) { |
| 37 | 37 | $typePattern = $pattern; |
| 38 | 38 | } elseif ($enum = $schema->getEnum()) { |
| 39 | - $typePattern = '(' . implode('|', $enum) . ')'; |
|
| 39 | + $typePattern = '('.implode('|', $enum).')'; |
|
| 40 | 40 | } |
| 41 | 41 | break; |
| 42 | 42 | default: |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |