Passed
Push — master ( 25f51d...6c8402 )
by Alexander
01:39
created
src/Router.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
         }
70 70
 
71 71
         // TODO cache of valid static routes, maybe with a try, catch, finally?
72
-        return new Route($url, function (Request $request) {
72
+        return new Route($url, function(Request $request) {
73 73
             return response\Page::fromRequest($request);
74 74
         });
75 75
     }
76 76
 
77
-    private static function matchDynamicRoute(string $url, string $method = Request::GET): ?Route
77
+    private static function matchDynamicRoute(string $url, string $method = Request::GET): ? Route
78 78
     {
79 79
         foreach (self::$routes[$method] as $route => $cb) {
80 80
             if ($route[0] !== substr($route, -1) || $route[0] !== static::$DELIMITER) {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
             $parameters = array_filter(
89 89
                 $matches,
90
-                function ($v) {
90
+                function($v) {
91 91
                     return !is_int($v);
92 92
                 },
93 93
                 \ARRAY_FILTER_USE_KEY
Please login to merge, or discard this patch.
src/Request.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $this->route = Router::match($this->url, $this->method);
63 63
     }
64 64
 
65
-    public function getHeader(string $name): ?string
65
+    public function getHeader(string $name): ? string
66 66
     {
67 67
         return $this->headers[$name] ?? null;
68 68
     }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      *
156 156
      * @return Response
157 157
      */
158
-    public function response(): ?Response
158
+    public function response(): ? Response
159 159
     {
160 160
         $cb = $this->route->callback;
161 161
         $this->parameters = $this->route->parameters;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      * @param string $key Dot notation for deeper values, i.e. `user.email`
174 174
      * @return mixed|null
175 175
      */
176
-    public function session(?string $key = null)
176
+    public function session(? string $key = null)
177 177
     {
178 178
         if (session_status() != PHP_SESSION_ACTIVE) {
179 179
             session_start();
Please login to merge, or discard this patch.