@@ -420,7 +420,7 @@ |
||
420 | 420 | |
421 | 421 | /** |
422 | 422 | * @param $method |
423 | - * @param $path |
|
423 | + * @param string $path |
|
424 | 424 | * @param $properties |
425 | 425 | * @return string |
426 | 426 | * @throws OperationIdInvalidException |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY), $queryStr); |
106 | 106 | |
107 | 107 | // Generic Dispatcher for RestServer |
108 | - $dispatcher = \FastRoute\simpleDispatcher(function (RouteCollector $r) { |
|
108 | + $dispatcher = \FastRoute\simpleDispatcher(function(RouteCollector $r) { |
|
109 | 109 | |
110 | 110 | foreach ($this->getRoutes() as $route) { |
111 | 111 | $r->addRoute( |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | // Check if script exists or if is itself |
231 | 231 | // -------------------------------------------------------------------------- |
232 | 232 | |
233 | - $debugBacktrace = debug_backtrace(); |
|
233 | + $debugBacktrace = debug_backtrace(); |
|
234 | 234 | if (!empty($_SERVER['SCRIPT_FILENAME']) |
235 | 235 | && file_exists($_SERVER['SCRIPT_FILENAME']) |
236 | 236 | && basename($_SERVER['SCRIPT_FILENAME']) !== basename($debugBacktrace[0]['file']) |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | require_once($file); |
241 | 241 | } else { |
242 | 242 | if (!defined("RESTSERVER_TEST")) { |
243 | - header("Content-Type: " . $this->mimeContentType($file)); |
|
243 | + header("Content-Type: ".$this->mimeContentType($file)); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | echo file_get_contents($file); |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | $routes = []; |
373 | 373 | foreach ($pathList as $path) { |
374 | 374 | foreach ($schema['paths'][$path] as $method => $properties) { |
375 | - $handler = $this->getMethodHandler($method, $basePath . $path, $properties); |
|
375 | + $handler = $this->getMethodHandler($method, $basePath.$path, $properties); |
|
376 | 376 | if (!isset($properties['operationId'])) { |
377 | 377 | throw new OperationIdInvalidException('OperationId was not found'); |
378 | 378 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | |
387 | 387 | $routes[] = new RoutePattern( |
388 | 388 | strtoupper($method), |
389 | - $basePath . $path, |
|
389 | + $basePath.$path, |
|
390 | 390 | $handler, |
391 | 391 | $parts[1], |
392 | 392 | $parts[0] |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | |
400 | 400 | protected function sortPaths($pathList) |
401 | 401 | { |
402 | - usort($pathList, function ($left, $right) { |
|
402 | + usort($pathList, function($left, $right) { |
|
403 | 403 | if (strpos($left, '{') === false && strpos($right, '{') !== false) { |
404 | 404 | return -16384; |
405 | 405 | } |
@@ -7,7 +7,7 @@ discard block |
||
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 |
||
23 | 23 | 'GET', |
24 | 24 | '/testclosure', |
25 | 25 | \ByJG\RestServer\HandleOutput\JsonHandler::class, |
26 | - function ($response, $request) { |
|
26 | + function($response, $request) { |
|
27 | 27 | $response->write('OK'); |
28 | 28 | } |
29 | 29 | )); |