@@ -157,7 +157,7 @@ |
||
157 | 157 | 'status' => $response->getStatusCode(), |
158 | 158 | 'headers' => $response->getHeaders(), |
159 | 159 | 'body' => $response->getBody() |
160 | - ->detach(), |
|
160 | + ->detach(), |
|
161 | 161 | 'transfer_stats' => [ |
162 | 162 | 'total_time' => $http_stats->data["total_time"] ?? 0, |
163 | 163 | "primary_port" => $http_stats->data["primary_port"] ?? '' |
@@ -137,14 +137,14 @@ discard block |
||
137 | 137 | // Get curl stats |
138 | 138 | $http_stats = new class { |
139 | 139 | public $data = []; |
140 | - public function __invoke(...$args){ |
|
140 | + public function __invoke(...$args) { |
|
141 | 141 | $this->data = $args[0]; |
142 | 142 | } |
143 | 143 | }; |
144 | 144 | |
145 | 145 | // Send the signed request to Amazon ES |
146 | 146 | /** @var \Psr\Http\Message\ResponseInterface $response */ |
147 | - $response = $psr7Handler($signedRequest,['http_stats_receiver' => $http_stats]) |
|
147 | + $response = $psr7Handler($signedRequest, ['http_stats_receiver' => $http_stats]) |
|
148 | 148 | ->then(function(\Psr\Http\Message\ResponseInterface $response) { |
149 | 149 | return $response; |
150 | 150 | }, function($error) { |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | 'total_time' => $http_stats->data["total_time"] ?? 0, |
163 | 163 | "primary_port" => $http_stats->data["primary_port"] ?? '' |
164 | 164 | ], |
165 | - 'effective_url' => (string)$psr7Request->getUri(), |
|
165 | + 'effective_url' => (string) $psr7Request->getUri(), |
|
166 | 166 | ]); |
167 | 167 | }); |
168 | 168 | } |
@@ -135,9 +135,11 @@ |
||
135 | 135 | ); |
136 | 136 | |
137 | 137 | // Get curl stats |
138 | - $http_stats = new class { |
|
138 | + $http_stats = new class |
|
139 | + { |
|
139 | 140 | public $data = []; |
140 | - public function __invoke(...$args){ |
|
141 | + public function __invoke(...$args) |
|
142 | + { |
|
141 | 143 | $this->data = $args[0]; |
142 | 144 | } |
143 | 145 | }; |