@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | class DiceApp extends App |
| 15 | 15 | { |
| 16 | - private const INDEX_FILE_PATH = __DIR__ . "/generated-index.html"; |
|
| 16 | + private const INDEX_FILE_PATH = __DIR__."/generated-index.html"; |
|
| 17 | 17 | private $diceCounter; |
| 18 | 18 | private $diceRequestHandler; |
| 19 | 19 | |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | public static function buildIndex() |
| 39 | 39 | { |
| 40 | 40 | $converter = new CommonMarkConverter(); |
| 41 | - $indexBody = $converter->convertToHtml(file_contents(__DIR__ . "/../README.md")); |
|
| 42 | - $indexContent = file_contents(__DIR__ . "/../www/templates/index.html"); |
|
| 41 | + $indexBody = $converter->convertToHtml(file_contents(__DIR__."/../README.md")); |
|
| 42 | + $indexContent = file_contents(__DIR__."/../www/templates/index.html"); |
|
| 43 | 43 | $indexContent = str_replace("{{body}}", $indexBody, $indexContent); |
| 44 | 44 | file_put_contents(self::INDEX_FILE_PATH, $indexContent); |
| 45 | 45 | return $indexContent; |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | $diceRequestHandler = $this->diceRequestHandler; |
| 88 | 88 | $this->get( |
| 89 | - "/{$path}" . self::DICE_PATH_REGEX, |
|
| 90 | - function (Request $request, $response, $args) use ($diceRequestHandler, $contentType) { |
|
| 89 | + "/{$path}".self::DICE_PATH_REGEX, |
|
| 90 | + function(Request $request, $response, $args) use ($diceRequestHandler, $contentType) { |
|
| 91 | 91 | return $diceRequestHandler->getDice( |
| 92 | 92 | $request->withHeader('accept', $contentType), |
| 93 | 93 | $response, |