@@ -27,7 +27,7 @@ |
||
| 27 | 27 | protected function getRequestParamsMock() |
| 28 | 28 | { |
| 29 | 29 | $router = new \Mezon\Router\Router(); |
| 30 | - $router->addRoute('/test/[i:rparam]/', function () {}, 'GET'); |
|
| 30 | + $router->addRoute('/test/[i:rparam]/', function() {}, 'GET'); |
|
| 31 | 31 | $router->callRoute('/test/111/'); |
| 32 | 32 | |
| 33 | 33 | return new \Mezon\Service\ServiceHttpTransport\HttpRequestParams($router); |
@@ -36,8 +36,7 @@ |
||
| 36 | 36 | return ''; |
| 37 | 37 | } elseif ($param == 'id' || $param == 'session_id') { |
| 38 | 38 | return $this->value; |
| 39 | - } |
|
| 40 | - else { |
|
| 39 | + } else { |
|
| 41 | 40 | return null; |
| 42 | 41 | } |
| 43 | 42 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $this->router = new \Mezon\Router\Router(); |
| 50 | 50 | |
| 51 | 51 | $this->router->setNoProcessorFoundErrorHandler( |
| 52 | - function (string $route) { |
|
| 52 | + function(string $route) { |
|
| 53 | 53 | $exception = new \Exception('Route ' . $route . ' was not found', - 1); |
| 54 | 54 | |
| 55 | 55 | $this->handleException($exception); |
@@ -116,14 +116,14 @@ discard block |
||
| 116 | 116 | if ($callType == 'public_call') { |
| 117 | 117 | $this->router->addRoute( |
| 118 | 118 | $route, |
| 119 | - function () use ($localServiceLogic, $callback) { |
|
| 119 | + function() use ($localServiceLogic, $callback) { |
|
| 120 | 120 | return $this->callPublicLogic($localServiceLogic, $callback, []); |
| 121 | 121 | }, |
| 122 | 122 | $requestMethod); |
| 123 | 123 | } else { |
| 124 | 124 | $this->router->addRoute( |
| 125 | 125 | $route, |
| 126 | - function () use ($localServiceLogic, $callback) { |
|
| 126 | + function() use ($localServiceLogic, $callback) { |
|
| 127 | 127 | return $this->callLogic($localServiceLogic, $callback, []); |
| 128 | 128 | }, |
| 129 | 129 | $requestMethod); |
@@ -138,10 +138,10 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function loadRoute(array $route): void |
| 140 | 140 | { |
| 141 | - if (! isset($route['route'])) { |
|
| 141 | + if (!isset($route['route'])) { |
|
| 142 | 142 | throw (new \Exception('Field "route" must be set')); |
| 143 | 143 | } |
| 144 | - if (! isset($route['callback'])) { |
|
| 144 | + if (!isset($route['callback'])) { |
|
| 145 | 145 | throw (new \Exception('Field "callback" must be set')); |
| 146 | 146 | } |
| 147 | 147 | $method = isset($route['method']) ? $route['method'] : 'GET'; |
@@ -369,14 +369,14 @@ discard block |
||
| 369 | 369 | |
| 370 | 370 | $this->router->addRoute( |
| 371 | 371 | $route, |
| 372 | - function () use ($actionsSource, $method) { |
|
| 372 | + function() use ($actionsSource, $method) { |
|
| 373 | 373 | return $this->callPublicLogic($actionsSource, $method, []); |
| 374 | 374 | }, |
| 375 | 375 | 'GET'); |
| 376 | 376 | |
| 377 | 377 | $this->router->addRoute( |
| 378 | 378 | $route, |
| 379 | - function () use ($actionsSource, $method) { |
|
| 379 | + function() use ($actionsSource, $method) { |
|
| 380 | 380 | return $this->callPublicLogic($actionsSource, $method, []); |
| 381 | 381 | }, |
| 382 | 382 | 'POST'); |