Completed
Push — master ( 3fcbeb...90dea4 )
by Alex
04:27 queued 02:03
created
ServiceTransport.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
Tests/HttpRequestParamsUnitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Tests/ServiceLogicUnitTests.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.