@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $this->router = new \Mezon\Router\Router(); |
| 49 | 49 | |
| 50 | 50 | $this->router->setNoProcessorFoundErrorHandler( |
| 51 | - function (string $route) { |
|
| 51 | + function(string $route) { |
|
| 52 | 52 | $exception = new \Exception('Route ' . $route . ' was not found', - 1); |
| 53 | 53 | |
| 54 | 54 | $this->handleException($exception); |
@@ -115,14 +115,14 @@ discard block |
||
| 115 | 115 | if ($callType == 'public_call') { |
| 116 | 116 | $this->router->addRoute( |
| 117 | 117 | $route, |
| 118 | - function () use ($localServiceLogic, $method) { |
|
| 118 | + function() use ($localServiceLogic, $method) { |
|
| 119 | 119 | return $this->callPublicLogic($localServiceLogic, $method, []); |
| 120 | 120 | }, |
| 121 | 121 | $requestMethod); |
| 122 | 122 | } else { |
| 123 | 123 | $this->router->addRoute( |
| 124 | 124 | $route, |
| 125 | - function () use ($localServiceLogic, $method) { |
|
| 125 | + function() use ($localServiceLogic, $method) { |
|
| 126 | 126 | return $this->callLogic($localServiceLogic, $method, []); |
| 127 | 127 | }, |
| 128 | 128 | $requestMethod); |
@@ -137,10 +137,10 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function loadRoute(array $route): void |
| 139 | 139 | { |
| 140 | - if (! isset($route['route'])) { |
|
| 140 | + if (!isset($route['route'])) { |
|
| 141 | 141 | throw (new \Exception('Field "route" must be set')); |
| 142 | 142 | } |
| 143 | - if (! isset($route['callback'])) { |
|
| 143 | + if (!isset($route['callback'])) { |
|
| 144 | 144 | throw (new \Exception('Field "callback" must be set')); |
| 145 | 145 | } |
| 146 | 146 | $method = isset($route['method']) ? $route['method'] : 'GET'; |
@@ -356,14 +356,14 @@ discard block |
||
| 356 | 356 | |
| 357 | 357 | $this->router->addRoute( |
| 358 | 358 | $route, |
| 359 | - function () use ($actionsSource, $method) { |
|
| 359 | + function() use ($actionsSource, $method) { |
|
| 360 | 360 | return $this->callPublicLogic($actionsSource, $method, []); |
| 361 | 361 | }, |
| 362 | 362 | 'GET'); |
| 363 | 363 | |
| 364 | 364 | $this->router->addRoute( |
| 365 | 365 | $route, |
| 366 | - function () use ($actionsSource, $method) { |
|
| 366 | + function() use ($actionsSource, $method) { |
|
| 367 | 367 | return $this->callPublicLogic($actionsSource, $method, []); |
| 368 | 368 | }, |
| 369 | 369 | 'POST'); |
@@ -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 | } |