@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | |
28 | 28 | public function index(Request $request, Response $response) |
29 | 29 | { |
30 | - $indexFilePath = __DIR__ . "/generated-index.html"; |
|
30 | + $indexFilePath = __DIR__."/generated-index.html"; |
|
31 | 31 | if (!file_exists($indexFilePath)) { |
32 | 32 | $converter = new CommonMarkConverter(); |
33 | - $indexBody = $converter->convertToHtml(file_get_contents(__DIR__ . "/../README.md")); |
|
34 | - $indexContent = file_get_contents(__DIR__ . "/../www/templates/index.html"); |
|
33 | + $indexBody = $converter->convertToHtml(file_get_contents(__DIR__."/../README.md")); |
|
34 | + $indexContent = file_get_contents(__DIR__."/../www/templates/index.html"); |
|
35 | 35 | $indexContent = str_replace("{{body}}", $indexBody, $indexContent); |
36 | 36 | file_put_contents($indexFilePath, $indexContent); |
37 | 37 | $response->write($indexContent); |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | { |
67 | 67 | $diceRequestHandler = $this->diceRequestHandler; |
68 | 68 | $this->get( |
69 | - "/{$path}" . self::DICE_PATH_REGEX, |
|
70 | - function (Request $request, $response, $args) use ($diceRequestHandler, $contentType) { |
|
69 | + "/{$path}".self::DICE_PATH_REGEX, |
|
70 | + function(Request $request, $response, $args) use ($diceRequestHandler, $contentType) { |
|
71 | 71 | return $diceRequestHandler->getDice( |
72 | 72 | $request->withHeader('accept', $contentType), |
73 | 73 | $response, |