Skip to content

Commit 1d5deb9

Browse files
committed
📦 Avoid invalid argument - cast possible float to the integer
1 parent 4b38b36 commit 1d5deb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Collector/ProfileClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private function collectRequestInformations(RequestInterface $request, Stack $st
156156

157157
private function collectResponseInformations(RequestInterface $request, ResponseInterface $response, StopwatchEvent $event, Stack $stack): void
158158
{
159-
$stack->setDuration($event->getDuration());
159+
$stack->setDuration((int) $event->getDuration());
160160
$stack->setResponseCode($response->getStatusCode());
161161
$stack->setClientResponse($this->formatter->formatResponseForRequest($response, $request));
162162
}
@@ -167,7 +167,7 @@ private function collectExceptionInformations(\Throwable $exception, StopwatchEv
167167
$this->collectResponseInformations($exception->getRequest(), $exception->getResponse(), $event, $stack);
168168
}
169169

170-
$stack->setDuration($event->getDuration());
170+
$stack->setDuration((int) $event->getDuration());
171171
$stack->setClientException($this->formatter->formatException($exception));
172172
}
173173

0 commit comments

Comments
 (0)