Skip to content

Commit 0f82c78

Browse files
committed
refactor: make duration float
1 parent 94ef8cc commit 0f82c78

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Requests/PostEvent/JobProcessingLongEventData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ class JobProcessingLongEventData implements EventDataInterface
1212
private string $projectName;
1313
private float $durationOvertimePercentage;
1414
private float $averageDuration;
15-
private int $currentDuration;
15+
private float $currentDuration;
1616
private JobData $jobData;
1717

1818
public function __construct(
1919
string $projectId,
2020
string $projectName,
2121
float $durationOvertimePercentage,
2222
float $averageDuration,
23-
int $currentDuration,
23+
float $currentDuration,
2424
JobData $jobData
2525
) {
2626
$this->projectId = $projectId;

tests/Requests/PostEvent/JobProcessingLongEventDataTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ public function testJsonSerialize(): void
2424
'my-configuration',
2525
'My configuration'
2626
);
27-
$failedEventData = new JobProcessingLongEventData('1234', 'My project', 12.534, 23.854, 12, $jobData);
27+
$failedEventData = new JobProcessingLongEventData('1234', 'My project', 12.534, 23.854, 12.0, $jobData);
2828
self::assertSame(
2929
[
3030
'averageDuration' => 23.854,
31-
'currentDuration' => 12,
31+
'currentDuration' => 12.0,
3232
'durationOvertimePercentage' => 12.534,
3333
'job' => [
3434
'id' => '23456',

0 commit comments

Comments
 (0)