Skip to content

Commit 9465a72

Browse files
lyrixxpolyfractal
authored andcommitted
Drop dead code (#729)
1 parent 763622b commit 9465a72

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

phpstan-src.neon

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
parameters:
22
ignoreErrors:
3-
4-
# because src\Elasticsearch\Connections\Connection.php
5-
- '#Anonymous function has an unused use \$logger.#'
6-
- '#Anonymous function has an unused use \$tracer.#'

src/Elasticsearch/Connections/Connection.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function __construct(
107107
LoggerInterface $log,
108108
LoggerInterface $trace
109109
) {
110-
110+
111111
if (isset($hostDetails['port']) !== true) {
112112
$hostDetails['port'] = 9200;
113113
}
@@ -138,7 +138,7 @@ public function __construct(
138138
$this->connectionParams = $connectionParams;
139139
$this->serializer = $serializer;
140140

141-
$this->handler = $this->wrapHandler($handler, $log, $trace);
141+
$this->handler = $this->wrapHandler($handler);
142142
}
143143

144144
/**
@@ -191,15 +191,15 @@ public function getLastRequestInfo()
191191
return $this->lastRequest;
192192
}
193193

194-
private function wrapHandler(callable $handler, LoggerInterface $logger, LoggerInterface $tracer)
194+
private function wrapHandler(callable $handler)
195195
{
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) {
197197

198198
$this->lastRequest = [];
199199
$this->lastRequest['request'] = $request;
200200

201201
// 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) {
203203

204204
$this->lastRequest['response'] = $response;
205205

0 commit comments

Comments
 (0)