Completed
Pull Request — master (#6)
by Joao
08:06
created
src/HttpRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -186,13 +186,13 @@
 block discarded – undo
186 186
         $servername = $this->getServerName();
187 187
 
188 188
         if ($port && $this->server('SERVER_PORT' !== false)) {
189
-            $servername .= ':' . $this->server('SERVER_PORT');
189
+            $servername .= ':'.$this->server('SERVER_PORT');
190 190
         }
191 191
 
192 192
         if ($protocol) {
193 193
             $servername = (
194 194
                 ($this->server('HTTPS') !== 'off'
195
-                    || $this->server('SERVER_PORT') == 443) ? "https://" : "http://") . $servername
195
+                    || $this->server('SERVER_PORT') == 443) ? "https://" : "http://").$servername
196 196
             ;
197 197
         }
198 198
 
Please login to merge, or discard this patch.
src/ServerRequestHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY), $queryStr);
104 104
 
105 105
         // Generic Dispatcher for RestServer
106
-        $dispatcher = \FastRoute\simpleDispatcher(function (RouteCollector $r) {
106
+        $dispatcher = \FastRoute\simpleDispatcher(function(RouteCollector $r) {
107 107
 
108 108
             foreach ($this->getRoutes() as $route) {
109 109
                 $r->addRoute(
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         // Check if script exists or if is itself
228 228
         // --------------------------------------------------------------------------
229 229
 
230
-        $debugBacktrace =  debug_backtrace();
230
+        $debugBacktrace = debug_backtrace();
231 231
         if (!empty($_SERVER['SCRIPT_FILENAME'])
232 232
             && file_exists($_SERVER['SCRIPT_FILENAME'])
233 233
             && basename($_SERVER['SCRIPT_FILENAME']) !== basename($debugBacktrace[0]['file'])
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
             if (strpos($file, '.php') !== false) {
237 237
                 require_once($file);
238 238
             } else {
239
-                header("Content-Type: " . $this->mimeContentType($file));
239
+                header("Content-Type: ".$this->mimeContentType($file));
240 240
 
241 241
                 echo file_get_contents($file);
242 242
             }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 
387 387
     protected function sortPaths($pathList)
388 388
     {
389
-        usort($pathList, function ($left, $right) {
389
+        usort($pathList, function($left, $right) {
390 390
             if (strpos($left, '{') === false && strpos($right, '{') !== false) {
391 391
                 return -16384;
392 392
             }
Please login to merge, or discard this patch.
src/ErrorHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     {
69 69
         if (method_exists($this->handler, 'addDataTable')) {
70 70
             $data = $this->handler->getDataTable();
71
-            $this->handler->addDataTable('Info #' . (count($data) + 1), array($name => $value));
71
+            $this->handler->addDataTable('Info #'.(count($data) + 1), array($name => $value));
72 72
         }
73 73
     }
74 74
 }
Please login to merge, or discard this patch.
web/app-swagger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__ . '/../vendor/autoload.php';
3
+require_once __DIR__.'/../vendor/autoload.php';
4 4
 
5 5
 $restServer = new \ByJG\RestServer\ServerRequestHandler();
6 6
 
7
-$restServer->setRoutesSwagger(__DIR__ . '/../tests/swagger-example.json');
7
+$restServer->setRoutesSwagger(__DIR__.'/../tests/swagger-example.json');
8 8
 
9 9
 $restServer->handle();
Please login to merge, or discard this patch.
web/app-dist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-require_once __DIR__ . '/../vendor/autoload.php';
10
+require_once __DIR__.'/../vendor/autoload.php';
11 11
 
12 12
 $restServer = new \ByJG\RestServer\ServerRequestHandler();
13 13
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     'GET',
24 24
     '/testclosure',
25 25
     \ByJG\RestServer\HandleOutput\JsonHandler::class,
26
-    function ($request, $response) {
26
+    function($request, $response) {
27 27
         $response->write('OK');
28 28
     }
29 29
 ));
Please login to merge, or discard this patch.