@@ -107,7 +107,7 @@ public function __construct(
107
107
LoggerInterface $ log ,
108
108
LoggerInterface $ trace
109
109
) {
110
-
110
+
111
111
if (isset ($ hostDetails ['port ' ]) !== true ) {
112
112
$ hostDetails ['port ' ] = 9200 ;
113
113
}
@@ -138,7 +138,7 @@ public function __construct(
138
138
$ this ->connectionParams = $ connectionParams ;
139
139
$ this ->serializer = $ serializer ;
140
140
141
- $ this ->handler = $ this ->wrapHandler ($ handler, $ log , $ trace );
141
+ $ this ->handler = $ this ->wrapHandler ($ handler );
142
142
}
143
143
144
144
/**
@@ -191,15 +191,15 @@ public function getLastRequestInfo()
191
191
return $ this ->lastRequest ;
192
192
}
193
193
194
- private function wrapHandler (callable $ handler, LoggerInterface $ logger , LoggerInterface $ tracer )
194
+ private function wrapHandler (callable $ handler )
195
195
{
196
- return function (array $ request , Connection $ connection , Transport $ transport = null , $ options ) use ($ handler, $ logger , $ tracer ) {
196
+ return function (array $ request , Connection $ connection , Transport $ transport = null , $ options ) use ($ handler ) {
197
197
198
198
$ this ->lastRequest = [];
199
199
$ this ->lastRequest ['request ' ] = $ request ;
200
200
201
201
// Send the request using the wrapped handler.
202
- $ response = Core::proxy ($ handler ($ request ), function ($ response ) use ($ connection , $ transport , $ logger , $ tracer , $ request , $ options ) {
202
+ $ response = Core::proxy ($ handler ($ request ), function ($ response ) use ($ connection , $ transport , $ request , $ options ) {
203
203
204
204
$ this ->lastRequest ['response ' ] = $ response ;
205
205
0 commit comments