Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
fix operating error on boxes
Browse files Browse the repository at this point in the history
Signed-off-by: mesilov <mesilov.maxim@gmail.com>
  • Loading branch information
mesilov committed Aug 21, 2023
1 parent 97c833f commit 8f144c9
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/Core/Response/DTO/Time.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,26 @@ class Time
/**
* Time constructor.
*
* @param float $start
* @param float $finish
* @param float $duration
* @param float $processing
* @param float $operating
* @param float $start
* @param float $finish
* @param float $duration
* @param float $processing
* @param float $operating
* @param \DateTimeImmutable $dateStart
* @param \DateTimeImmutable $dateFinish
* @param int|null $operatingResetAt
* @param int|null $operatingResetAt
*/
public function __construct(
float $start,
float $finish,
float $duration,
float $processing,
float $operating,
float $start,
float $finish,
float $duration,
float $processing,
float $operating,
DateTimeImmutable $dateStart,
DateTimeImmutable $dateFinish,
?int $operatingResetAt
) {
?int $operatingResetAt
)
{
$this->start = $start;
$this->finish = $finish;
$this->duration = $duration;
Expand Down Expand Up @@ -139,7 +140,7 @@ public static function initFromResponse(array $response): self
(float)$response['finish'],
(float)$response['duration'],
(float)$response['processing'],
(float)$response['operating'],
array_key_exists('operating', $response) ? (float)$response['operating'] : 0,
new DateTimeImmutable($response['date_start']),
new DateTimeImmutable($response['date_finish']),
$response['operating_reset_at'] ?? null
Expand Down

0 comments on commit 8f144c9

Please sign in to comment.