@@ -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"] ?? '' |
@@ -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 | }; |