Skip to content

Commit 93e87e9

Browse files
committed
Change StorageController to be cleaner
- Whitespace fixes - Code restructure
1 parent 127f12c commit 93e87e9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Controller/StorageController.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class StorageController extends ServerController
99
{
1010
final public function __invoke(ServerRequestInterface $request, array $args): ResponseInterface
11-
{
11+
{
1212
$body = <<< EOF
1313
@prefix : <#>.
1414
@prefix inbox: <>.
@@ -23,10 +23,7 @@ final public function __invoke(ServerRequestInterface $request, array $args): Re
2323
st:mtime 1576853574.389;
2424
st:size 4096.
2525
EOF;
26-
$response = $this->getResponse();
27-
28-
$response->getBody()->write($body);
29-
return $response
30-
->withHeader("Content-type", "text/turtle");
26+
27+
return $this->createTextResponse($body)->withHeader("Content-type", "text/turtle");
3128
}
3229
}

0 commit comments

Comments
 (0)