Completed
Pull Request — master (#8)
by Andreas
02:20
created
config/routes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     \Psr\Http\Message\ResponseInterface $response
42 42
 ) use ($app){
43 43
     $params = $request->getParsedBody();
44
-    if (! is_array($params)) {
44
+    if (!is_array($params)) {
45 45
         throw new UnexpectedValueException('Expected array');
46 46
     }
47 47
 
@@ -54,18 +54,18 @@  discard block
 block discarded – undo
54 54
     $cpl->insert($cfp);
55 55
 
56 56
     $uri = $request->getUri();
57
-    $uri = $uri->withPath('v1/cfp/' . $cfp->getId());
57
+    $uri = $uri->withPath('v1/cfp/'.$cfp->getId());
58 58
     return $response->withRedirect((string)$uri, 201);
59 59
 });
60 60
 
61 61
 
62
-$app->put('/v1/cfp/{hash}', function (
62
+$app->put('/v1/cfp/{hash}', function(
63 63
     \Psr\Http\Message\ServerRequestInterface $request,
64 64
     \Psr\Http\Message\ResponseInterface $response,
65 65
     array $args
66 66
 ) use ($app){
67 67
     $params = $request->getParsedBody();
68
-    if (! is_array($params)) {
68
+    if (!is_array($params)) {
69 69
         throw new UnexpectedValueException('Expected array');
70 70
     }
71 71
 
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
     $cpl->update($cfp, $args['hash']);
79 79
 
80 80
     $uri = $request->getUri();
81
-    $uri = $uri->withPath('v1/cfp/' . $cfp->getId());
81
+    $uri = $uri->withPath('v1/cfp/'.$cfp->getId());
82 82
     return $response->withHeader('Location', (string)$uri)->withStatus(204);
83 83
 });
84 84
 
85 85
 
86
-$app->delete('/v1/cfp/{id}', function (
86
+$app->delete('/v1/cfp/{id}', function(
87 87
     \Psr\Http\Message\ServerRequestInterface $request,
88 88
     \Psr\Http\Message\ResponseInterface $response
89 89
 ) use ($app){
Please login to merge, or discard this patch.