@@ -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 | } |
@@ -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 | } |
@@ -36,9 +36,9 @@ |
||
36 | 36 | |
37 | 37 | // starting works |
38 | 38 | |
39 | - $app->starting()->add(static function () use ($rec, $isp, $dsp) { |
|
39 | + $app->starting()->add(static function() use ($rec, $isp, $dsp) { |
|
40 | 40 | // routes parsing |
41 | - if (defined('CWD') && is_file($rf = CWD . '/routes.php')) { |
|
41 | + if (defined('CWD') && is_file($rf = CWD.'/routes.php')) { |
|
42 | 42 | (new Initializer)->loads(...(array) include $rf); |
43 | 43 | } |
44 | 44 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | Server::layers()->prepend(null, DI::object(ExceptionReview::class)); |
43 | 43 | |
44 | 44 | // starting wait |
45 | - $app->starting()->add(static function () use ($options) { |
|
45 | + $app->starting()->add(static function() use ($options) { |
|
46 | 46 | // add traffic monitor layer |
47 | 47 | DI::has(Daemon::class) && Server::layers()->prepend( |
48 | 48 | IngressWrapper::class, |