@@ -127,7 +127,7 @@ |
||
| 127 | 127 | |
| 128 | 128 | // Process Class::Method() |
| 129 | 129 | $function = $class[1]; |
| 130 | - $class = $class[0]; |
|
| 130 | + $class = $class[0]; |
|
| 131 | 131 | if (!class_exists($class)) { |
| 132 | 132 | throw new ClassNotFoundException("Class '$class' defined in the route is not found"); |
| 133 | 133 | } |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | new RoutePattern( |
| 97 | 97 | $route->getMethod(), |
| 98 | 98 | $route->getPattern(), |
| 99 | - function () use ($route) { |
|
| 99 | + function() use ($route) { |
|
| 100 | 100 | return new MockOutputProcessor($route->getOutputProcessor()); |
| 101 | 101 | }, |
| 102 | 102 | $class, |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | public function getDispatcher() |
| 48 | 48 | { |
| 49 | 49 | // Generic Dispatcher for RestServer |
| 50 | - return simpleDispatcher(function (RouteCollector $r) { |
|
| 50 | + return simpleDispatcher(function(RouteCollector $r) { |
|
| 51 | 51 | |
| 52 | 52 | foreach ($this->getRoutes() as $route) { |
| 53 | 53 | $r->addRoute( |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | ); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - $outputProcessor = $this->getMethodOutputProcessor($method, $basePath. $path, $properties); |
|
| 120 | + $outputProcessor = $this->getMethodOutputProcessor($method, $basePath . $path, $properties); |
|
| 121 | 121 | |
| 122 | 122 | $routes[] = new RoutePattern( |
| 123 | 123 | strtoupper($method), |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | protected function sortPaths($pathList) |
| 136 | 136 | { |
| 137 | - usort($pathList, function ($left, $right) { |
|
| 137 | + usort($pathList, function($left, $right) { |
|
| 138 | 138 | if (strpos($left, '{') === false && strpos($right, '{') !== false) { |
| 139 | 139 | return -16384; |
| 140 | 140 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | $produces = null; |
| 171 | 171 | if (isset($properties['produces'])) { |
| 172 | - $produces = (array) $properties['produces']; |
|
| 172 | + $produces = (array)$properties['produces']; |
|
| 173 | 173 | } |
| 174 | 174 | if (empty($produces) && isset($properties["responses"]["200"]["content"])) { |
| 175 | 175 | $produces = array_keys($properties["responses"]["200"]["content"]); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | /** |
| 11 | 11 | * @var Request |
| 12 | 12 | */ |
| 13 | - protected $psrRequest ; |
|
| 13 | + protected $psrRequest; |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * |