@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | \Psr\Http\Message\ResponseInterface $response |
| 44 | 44 | ) use ($app){ |
| 45 | 45 | $params = $request->getParsedBody(); |
| 46 | - if (! is_array($params)) { |
|
| 46 | + if (!is_array($params)) { |
|
| 47 | 47 | throw new UnexpectedValueException('Expected array'); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | try { |
| 52 | 52 | $cfp = $cfpFactory->createCfp($params, $app->getContainer()['client']); |
| 53 | 53 | } catch (\Exception $e) { |
| 54 | - error_log($e->getMessage() . "\n" . $e->getTraceAsString()); |
|
| 54 | + error_log($e->getMessage()."\n".$e->getTraceAsString()); |
|
| 55 | 55 | return $response->withStatus(404, 'The CfP could not be created'); |
| 56 | 56 | } |
| 57 | 57 | $cpl = new \Callingallpapers\Api\PersistenceLayer\CfpPersistenceLayer( |
@@ -61,18 +61,18 @@ discard block |
||
| 61 | 61 | $cpl->insert($cfp); |
| 62 | 62 | |
| 63 | 63 | $uri = $request->getUri(); |
| 64 | - $uri = $uri->withPath('v1/cfp/' . $cfp->getId()); |
|
| 64 | + $uri = $uri->withPath('v1/cfp/'.$cfp->getId()); |
|
| 65 | 65 | return $response->withRedirect((string)$uri, 201); |
| 66 | 66 | }); |
| 67 | 67 | |
| 68 | 68 | |
| 69 | -$app->put('/v1/cfp/{hash}', function ( |
|
| 69 | +$app->put('/v1/cfp/{hash}', function( |
|
| 70 | 70 | \Psr\Http\Message\ServerRequestInterface $request, |
| 71 | 71 | \Psr\Http\Message\ResponseInterface $response, |
| 72 | 72 | array $args |
| 73 | 73 | ) use ($app){ |
| 74 | 74 | $params = $request->getParsedBody(); |
| 75 | - if (! is_array($params)) { |
|
| 75 | + if (!is_array($params)) { |
|
| 76 | 76 | throw new UnexpectedValueException('Expected array'); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | $cpl->update($cfp, $args['hash']); |
| 87 | 87 | |
| 88 | 88 | $uri = $request->getUri(); |
| 89 | - $uri = $uri->withPath('v1/cfp/' . $cfp->getId()); |
|
| 89 | + $uri = $uri->withPath('v1/cfp/'.$cfp->getId()); |
|
| 90 | 90 | return $response->withHeader('Location', (string)$uri)->withStatus(204); |
| 91 | 91 | }); |
| 92 | 92 | |
| 93 | 93 | |
| 94 | -$app->delete('/v1/cfp/{id}', function ( |
|
| 94 | +$app->delete('/v1/cfp/{id}', function( |
|
| 95 | 95 | \Psr\Http\Message\ServerRequestInterface $request, |
| 96 | 96 | \Psr\Http\Message\ResponseInterface $response |
| 97 | 97 | ) use ($app){ |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | return $response->withHeader('Content-Length', '0')->withStatus(204); |
| 106 | 106 | }); |
| 107 | 107 | |
| 108 | -$app->get('/v1/search', function ( |
|
| 108 | +$app->get('/v1/search', function( |
|
| 109 | 109 | \Psr\Http\Message\ServerRequestInterface $request, |
| 110 | 110 | \Psr\Http\Message\ResponseInterface $response, |
| 111 | 111 | array $args |
@@ -120,5 +120,5 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | $cfpMapper = new \Callingallpapers\Api\Entity\CfpListMapper(); |
| 122 | 122 | |
| 123 | - return $this->view->render($response, $cfpMapper->map($list), 200, 'cfp/list.twig');; |
|
| 123 | + return $this->view->render($response, $cfpMapper->map($list), 200, 'cfp/list.twig'); ; |
|
| 124 | 124 | }); |