@@ -82,13 +82,13 @@ |
||
82 | 82 | 'zipkin' => [ZipkinHAV2::class, ZipkinJFV2::class], |
83 | 83 | 'udp' => [UDPRelays::class, ZipkinJFV2::class], |
84 | 84 | ], |
85 | - function (Transport $transport = null, Protocol $protocol = null) { |
|
85 | + function(Transport $transport = null, Protocol $protocol = null) { |
|
86 | 86 | $this->transport && $this->transport->disconnect(); |
87 | 87 | $this->transport = $transport; |
88 | 88 | $this->protocol = $protocol; |
89 | 89 | $this->changed($transport); |
90 | 90 | }, |
91 | - static function (Throwable $e) { |
|
91 | + static function(Throwable $e) { |
|
92 | 92 | logger('traced')->warning('Transport initialize failed', [ |
93 | 93 | 'p' => 'zipkin', |
94 | 94 | 'ec' => get_class($e), |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | PHP_SAPI === 'cli' ? SWOOLE_SOCK_ASYNC : SWOOLE_SOCK_SYNC |
59 | 59 | ); |
60 | 60 | $this->client->connect($this->endpoint->host(), $this->endpoint->port()); |
61 | - $this->sender = function (string $data) { |
|
61 | + $this->sender = function(string $data) { |
|
62 | 62 | @$this->client->send($data); |
63 | 63 | }; |
64 | 64 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | SOCK_DGRAM, |
73 | 73 | $this->uxdomain ? IPPROTO_IP : SOL_UDP |
74 | 74 | ); |
75 | - $this->sender = function (string $data) { |
|
75 | + $this->sender = function(string $data) { |
|
76 | 76 | @socket_sendto( |
77 | 77 | $this->socket, |
78 | 78 | $data, |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | private function packing(string $payload) : string |
143 | 143 | { |
144 | 144 | return |
145 | - self::MAGIC . |
|
146 | - pack('N', strlen($this->identify)) . |
|
147 | - $this->identify . |
|
148 | - pack('N', strlen($payload)) . |
|
145 | + self::MAGIC. |
|
146 | + pack('N', strlen($this->identify)). |
|
147 | + $this->identify. |
|
148 | + pack('N', strlen($payload)). |
|
149 | 149 | $payload |
150 | 150 | ; |
151 | 151 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | Closure $setter, |
33 | 33 | Closure $failure = null |
34 | 34 | ) : void { |
35 | - $source->watching($conf, static function (string $dsn) use ($schemes, $setter, $failure) { |
|
35 | + $source->watching($conf, static function(string $dsn) use ($schemes, $setter, $failure) { |
|
36 | 36 | // parsing dsn |
37 | 37 | $parsed = parse_url($dsn) ?: []; |
38 | 38 |