Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Dec 21, 2023
1 parent 82cbb8c commit caacf27
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Metrics/Types/GaugeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class GaugeType extends AbstractType
public const TYPE = 'g';

/**
* @var int|float
* @var float
*/
private $last;

Expand All @@ -32,7 +32,7 @@ final class GaugeType extends AbstractType
private $max;

/**
* @var int|float
* @var float
*/
private $sum;

Expand All @@ -48,9 +48,11 @@ public function __construct(string $key, $value, MetricsUnit $unit, array $tags,
{
parent::__construct($key, $unit, $tags, $timestamp);

$value = (float) $value;

$this->last = $value;
$this->min = (float) $value;
$this->max = (float) $value;
$this->min = $value;
$this->max = $value;
$this->sum = $value;
$this->count = 1;
}
Expand Down

0 comments on commit caacf27

Please sign in to comment.