@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | class DiceApp extends App |
15 | 15 | { |
16 | 16 | const DICE_PATH_REGEX = "{dice:(?:/[0-9]*[dD][^\/]+)+/?}"; |
17 | - private const INDEX_FILE_PATH = __DIR__ . "/generated-index.html"; |
|
17 | + private const INDEX_FILE_PATH = __DIR__."/generated-index.html"; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @var DiceCounter |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | public static function buildIndex(): string |
44 | 44 | { |
45 | 45 | $converter = new CommonMarkConverter(); |
46 | - $indexBody = $converter->convertToHtml(file_contents(__DIR__ . "/../README.md")); |
|
47 | - $indexContent = file_contents(__DIR__ . "/../www/templates/index.html"); |
|
46 | + $indexBody = $converter->convertToHtml(file_contents(__DIR__."/../README.md")); |
|
47 | + $indexContent = file_contents(__DIR__."/../www/templates/index.html"); |
|
48 | 48 | $indexContent = str_replace("{{body}}", $indexBody, $indexContent); |
49 | 49 | file_put_contents(self::INDEX_FILE_PATH, $indexContent); |
50 | 50 | return $indexContent; |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | { |
92 | 92 | $diceRequestHandler = $this->diceRequestHandler; |
93 | 93 | $this->get( |
94 | - "/{$path}" . self::DICE_PATH_REGEX, |
|
95 | - function (Request $request, Response $response, $args) use ($diceRequestHandler, $contentType): Response { |
|
94 | + "/{$path}".self::DICE_PATH_REGEX, |
|
95 | + function(Request $request, Response $response, $args) use ($diceRequestHandler, $contentType): Response { |
|
96 | 96 | return $diceRequestHandler->getDice( |
97 | 97 | $request->withHeader('accept', $contentType), |
98 | 98 | $response, |