@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $routes = []; |
55 | 55 | foreach ($pathList as $path) { |
56 | 56 | foreach ($this->schema['paths'][$path] as $method => $properties) { |
57 | - $handler = $this->handler->getMethodHandler($method, $basePath . $path, $properties); |
|
57 | + $handler = $this->handler->getMethodHandler($method, $basePath.$path, $properties); |
|
58 | 58 | if (!isset($properties['operationId'])) { |
59 | 59 | throw new OperationIdInvalidException('OperationId was not found'); |
60 | 60 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $routes[] = new RoutePattern( |
70 | 70 | strtoupper($method), |
71 | - $basePath . $path, |
|
71 | + $basePath.$path, |
|
72 | 72 | $handler, |
73 | 73 | $parts[1], |
74 | 74 | $parts[0] |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | protected function sortPaths($pathList) |
83 | 83 | { |
84 | - usort($pathList, function ($left, $right) { |
|
84 | + usort($pathList, function($left, $right) { |
|
85 | 85 | if (strpos($left, '{') === false && strpos($right, '{') !== false) { |
86 | 86 | return -16384; |
87 | 87 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY), $queryStr); |
107 | 107 | |
108 | 108 | // Generic Dispatcher for RestServer |
109 | - $dispatcher = simpleDispatcher(function (RouteCollector $r) { |
|
109 | + $dispatcher = simpleDispatcher(function(RouteCollector $r) { |
|
110 | 110 | |
111 | 111 | foreach ($this->getRoutes() as $route) { |
112 | 112 | $r->addRoute( |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | // Check if script exists or if is itself |
232 | 232 | // -------------------------------------------------------------------------- |
233 | 233 | |
234 | - $debugBacktrace = debug_backtrace(); |
|
234 | + $debugBacktrace = debug_backtrace(); |
|
235 | 235 | if (!empty($_SERVER['SCRIPT_FILENAME']) |
236 | 236 | && file_exists($_SERVER['SCRIPT_FILENAME']) |
237 | 237 | && basename($_SERVER['SCRIPT_FILENAME']) !== basename($debugBacktrace[0]['file']) |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | require_once($file); |
242 | 242 | } else { |
243 | 243 | if (!defined("RESTSERVER_TEST")) { |
244 | - header("Content-Type: " . $this->mimeContentType($file)); |
|
244 | + header("Content-Type: ".$this->mimeContentType($file)); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | echo file_get_contents($file); |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | |
380 | 380 | $produces = null; |
381 | 381 | if (isset($properties['produces'])) { |
382 | - $produces = (array) $properties['produces']; |
|
382 | + $produces = (array)$properties['produces']; |
|
383 | 383 | } |
384 | 384 | if (empty($produces) && isset($properties["responses"]["200"]["content"])) { |
385 | 385 | $produces = array_keys($properties["responses"]["200"]["content"]); |