@@ -3,10 +3,8 @@ |
||
3 | 3 | namespace spec\MeadSteve\DiceApi; |
4 | 4 | |
5 | 5 | use MeadSteve\DiceApi\Dice\BasicDice; |
6 | -use MeadSteve\DiceApi\Dice; |
|
7 | 6 | use MeadSteve\DiceApi\Dice\Factories\DiceFactory; |
8 | 7 | use PhpSpec\ObjectBehavior; |
9 | -use Prophecy\Argument; |
|
10 | 8 | |
11 | 9 | class UrlDiceGeneratorSpec extends ObjectBehavior |
12 | 10 | { |
@@ -1,2 +1,2 @@ |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . "/../vendor/autoload.php"; |
|
2 | +require_once __DIR__."/../vendor/autoload.php"; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use Predis\Connection\ConnectionException; |
8 | 8 | use Prophecy\Argument; |
9 | 9 | |
10 | -require_once __DIR__ . "/RedisClientMock.php"; |
|
10 | +require_once __DIR__."/RedisClientMock.php"; |
|
11 | 11 | |
12 | 12 | class RedisCounterSpec extends ObjectBehavior |
13 | 13 | { |
@@ -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 indexFilePath = __DIR__ . "/generated-index.html"; |
|
13 | + private const indexFilePath = __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::indexFilePath, $indexContent); |
42 | 42 | return $indexContent; |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | { |
83 | 83 | $diceRequestHandler = $this->diceRequestHandler; |
84 | 84 | $this->get( |
85 | - "/{$path}" . self::DICE_PATH_REGEX, |
|
86 | - function (Request $request, $response, $args) use ($diceRequestHandler, $contentType) { |
|
85 | + "/{$path}".self::DICE_PATH_REGEX, |
|
86 | + function(Request $request, $response, $args) use ($diceRequestHandler, $contentType) { |
|
87 | 87 | return $diceRequestHandler->getDice( |
88 | 88 | $request->withHeader('accept', $contentType), |
89 | 89 | $response, |