| @@ -2,6 +2,6 @@ | ||
| 2 | 2 | |
| 3 | 3 | use MeadSteve\DiceApi\DiceApp; | 
| 4 | 4 | |
| 5 | -require __DIR__ . "/../vendor/autoload.php"; | |
| 5 | +require __DIR__."/../vendor/autoload.php"; | |
| 6 | 6 | |
| 7 | 7 | DiceApp::buildIndex(); | 
| 8 | 8 | \ No newline at end of file | 
| @@ -10,7 +10,7 @@ discard block | ||
| 10 | 10 | |
| 11 | 11 | class DiceApp extends App | 
| 12 | 12 |  { | 
| 13 | - private const INDEX_FILE_PATH = __DIR__ . "/generated-index.html"; | |
| 13 | + private const INDEX_FILE_PATH = __DIR__."/generated-index.html"; | |
| 14 | 14 | private $diceCounter; | 
| 15 | 15 | private $diceRequestHandler; | 
| 16 | 16 | |
| @@ -35,8 +35,8 @@ discard block | ||
| 35 | 35 | public static function buildIndex() | 
| 36 | 36 |      { | 
| 37 | 37 | $converter = new CommonMarkConverter(); | 
| 38 | - $indexBody = $converter->convertToHtml(file_get_contents(__DIR__ . "/../README.md")); | |
| 39 | - $indexContent = file_get_contents(__DIR__ . "/../www/templates/index.html"); | |
| 38 | + $indexBody = $converter->convertToHtml(file_get_contents(__DIR__."/../README.md")); | |
| 39 | + $indexContent = file_get_contents(__DIR__."/../www/templates/index.html"); | |
| 40 | 40 |          $indexContent = str_replace("{{body}}", $indexBody, $indexContent); | 
| 41 | 41 | file_put_contents(self::INDEX_FILE_PATH, $indexContent); | 
| 42 | 42 | return $indexContent; | 
| @@ -83,8 +83,8 @@ discard block | ||
| 83 | 83 |      { | 
| 84 | 84 | $diceRequestHandler = $this->diceRequestHandler; | 
| 85 | 85 | $this->get( | 
| 86 | -            "/{$path}" . self::DICE_PATH_REGEX, | |
| 87 | -            function (Request $request, $response, $args) use ($diceRequestHandler, $contentType) { | |
| 86 | +            "/{$path}".self::DICE_PATH_REGEX, | |
| 87 | +            function(Request $request, $response, $args) use ($diceRequestHandler, $contentType) { | |
| 88 | 88 | return $diceRequestHandler->getDice( | 
| 89 | 89 |                      $request->withHeader('accept', $contentType), | 
| 90 | 90 | $response, |