@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | $r = $this->records; |
| 30 | 30 | |
| 31 | - $r->accept(strtoupper($method), $this->prefix . $uri, $processor); |
|
| 31 | + $r->accept(strtoupper($method), $this->prefix.$uri, $processor); |
|
| 32 | 32 | |
| 33 | 33 | return $this; |
| 34 | 34 | } |
@@ -25,10 +25,10 @@ |
||
| 25 | 25 | |
| 26 | 26 | switch ($srq->getHeaderLine('Content-Type')) { |
| 27 | 27 | case 'application/json': |
| 28 | - $srq->withParsedBody(json_decode((string)$srq->getBody(), true)); |
|
| 28 | + $srq->withParsedBody(json_decode((string) $srq->getBody(), true)); |
|
| 29 | 29 | break; |
| 30 | 30 | case 'application/x-www-form-urlencoded': |
| 31 | - parse_str((string)$srq->getBody(), $posted); |
|
| 31 | + parse_str((string) $srq->getBody(), $posted); |
|
| 32 | 32 | $srq->withParsedBody($posted); |
| 33 | 33 | break; |
| 34 | 34 | } |
@@ -44,16 +44,16 @@ |
||
| 44 | 44 | } elseif ($result instanceof ArrayObject) { |
| 45 | 45 | return $this->ccJson( |
| 46 | 46 | $response, |
| 47 | - json_encode((array)$result, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) |
|
| 47 | + json_encode((array) $result, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) |
|
| 48 | 48 | ); |
| 49 | 49 | } elseif (method_exists($result, '__toString')) { |
| 50 | - return $response->withBody(new Body((string)$result)); |
|
| 50 | + return $response->withBody(new Body((string) $result)); |
|
| 51 | 51 | } |
| 52 | 52 | throw new RespondingCodecException('Unacceptable object'); |
| 53 | 53 | case 'NULL': |
| 54 | 54 | return $response; |
| 55 | 55 | default: |
| 56 | - return $response->withBody(new Body((string)$result)); |
|
| 56 | + return $response->withBody(new Body((string) $result)); |
|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function starting(Application $app) : void |
| 29 | 29 | { |
| 30 | - $app->starting()->add(static function () { |
|
| 30 | + $app->starting()->add(static function() { |
|
| 31 | 31 | Ticker::new([ |
| 32 | 32 | Metrics::gauge()->named('web.ctrl.working'), |
| 33 | - ], static function (Metrics\Gauge $wc) { |
|
| 33 | + ], static function(Metrics\Gauge $wc) { |
|
| 34 | 34 | $wc->set(Stats::working()); |
| 35 | 35 | }); |
| 36 | 36 | }); |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | |
| 36 | 36 | $platform = DI::get(Observer::class); |
| 37 | 37 | |
| 38 | - $platform->transportable(static function () { |
|
| 38 | + $platform->transportable(static function() { |
|
| 39 | 39 | Server::layers()->has(InboundTracing::class) |
| 40 | 40 | || Server::layers()->prepend(IngressWrapper::class, DI::object(InboundTracing::class)); |
| 41 | - }, static function () { |
|
| 41 | + }, static function() { |
|
| 42 | 42 | Server::layers()->remove(InboundTracing::class); |
| 43 | 43 | }); |
| 44 | 44 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | Server::layers()->prepend(null, DI::object(ExceptionReview::class)); |
| 40 | 40 | |
| 41 | 41 | // starting wait |
| 42 | - $app->starting()->add(static function () { |
|
| 42 | + $app->starting()->add(static function() { |
|
| 43 | 43 | // add traffic monitor layer |
| 44 | 44 | DI::has(Daemon::class) && Server::layers()->prepend( |
| 45 | 45 | IngressWrapper::class, |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | $this->parsedBody($request); |
| 65 | 65 | |
| 66 | - return race(async(function (ServerRequest $sr) { |
|
| 66 | + return race(async(function(ServerRequest $sr) { |
|
| 67 | 67 | return $this->dispatcher->invoke($sr); |
| 68 | 68 | }, $ctx, $request), timeout(5000)); |
| 69 | 69 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $this->name = $name; |
| 42 | 42 | $this->listen = $listen; |
| 43 | 43 | |
| 44 | - $this->events()->attach(NETEvs\Worker::STARTED, function (Conn $ctx) { |
|
| 44 | + $this->events()->attach(NETEvs\Worker::STARTED, function(Conn $ctx) { |
|
| 45 | 45 | $ctx->events()->attach(NETEvs\HTTP::REQUESTING, self::layers()->handler()); |
| 46 | 46 | }); |
| 47 | 47 | } |
@@ -27,13 +27,13 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public static function started() : void |
| 29 | 29 | { |
| 30 | - self::$working ++; |
|
| 30 | + self::$working++; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | */ |
| 35 | 35 | public static function finished() : void |
| 36 | 36 | { |
| 37 | - self::$working --; |
|
| 37 | + self::$working--; |
|
| 38 | 38 | } |
| 39 | 39 | } |