Completed
Push — master ( 90b7b2...d5b357 )
by Steve
03:23
created
src/DiceApp.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
         $this->get("/dice-stats", [$this, 'diceStats']);
35 35
         $this->get("{dice:(?:/[0-9]*[dD][0-9]+)+/?}", [$this, 'getDice']);
36 36
 
37
-        $this->get("/html{dice:(?:/[0-9]*[dD][0-9]+)+/?}", function (Request $request, $response, $args) {
37
+        $this->get("/html{dice:(?:/[0-9]*[dD][0-9]+)+/?}", function(Request $request, $response, $args) {
38 38
             return $this->getDice($request->withHeader('accept', 'text/html'), $response, $args);
39 39
         });
40
-        $this->get("/json{dice:(?:/[0-9]*[dD][0-9]+)+/?}", function (Request $request, $response, $args) {
40
+        $this->get("/json{dice:(?:/[0-9]*[dD][0-9]+)+/?}", function(Request $request, $response, $args) {
41 41
             return $this->getDice($request->withHeader('accept', 'application/json'), $response, $args);
42 42
         });
43 43
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     {
106 106
         $rolledValue = $request->getHeader('totally-legit')[0];
107 107
         return array_map(
108
-            function (Dice $dice) use ($rolledValue) {
108
+            function(Dice $dice) use ($rolledValue) {
109 109
                 return new TotallyLegit($dice, (int) $rolledValue);
110 110
             },
111 111
             $dice
Please login to merge, or discard this patch.
src/Renderer/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     private function diceAsAssocArrays(array $diceCollection)
28 28
     {
29
-        return array_map(function (Dice $dice) {
29
+        return array_map(function(Dice $dice) {
30 30
             return [
31 31
                 "value" => $dice->roll(),
32 32
                 "size" => "d" . $dice->size()
Please login to merge, or discard this patch.
src/Dice/DiceGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     public function diceFromUrlString($urlString)
11 11
     {
12 12
         $parts = explode("/", $urlString);
13
-        $parts = array_filter($parts, function($part) {return $part !== "";});
13
+        $parts = array_filter($parts, function($part) {return $part !== ""; });
14 14
         $diceSets = array_map([$this, 'getDiceForPart'], $parts);
15 15
         return $this->flattenDiceSets($diceSets);
16 16
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $data = [];
67 67
         $valid = preg_match("/(?P<count>[0-9]+)?d(?P<size>[0-9]+)/i", $part, $data);
68 68
         if (!$valid) {
69
-            throw new UncreatableDiceException("Problem creating dice from incorrectly formated data: " + $part);
69
+            throw new UncreatableDiceException("Problem creating dice from incorrectly formated data: " +$part);
70 70
         }
71 71
         if (!$data["count"]) {
72 72
             $data["count"] = 1;
Please login to merge, or discard this patch.