Skip to content

Commit 8786b29

Browse files
authored
Fix internal API usage (#306)
1 parent a7b27e5 commit 8786b29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/php/src/Metrics.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function constructPayload(string $log_id, Request $request, $response): a
228228
[
229229
'pageref' => $request->url(),
230230
'startedDateTime' => date('c', $request_start),
231-
'time' => (microtime(true) - $request_start) * 1000,
231+
'time' => (int) ((microtime(true) - $request_start) * 1000),
232232
'request' => $this->processRequest($request),
233233
'response' => $this->processResponse($response)
234234
]

packages/php/tests/MetricsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function testConstructPayload(): void
307307
'startedDateTime was not in a format matching `2019-12-19T01:17:51+00:00`.'
308308
);
309309

310-
$this->assertIsFloat($payload_entry['time']);
310+
$this->assertIsInt($payload_entry['time']);
311311
$this->assertIsNumeric($payload_entry['time']);
312312
$this->assertGreaterThan(0, $payload_entry['time']);
313313

0 commit comments

Comments
 (0)