Skip to content

Commit

Permalink
Change config variable type
Browse files Browse the repository at this point in the history
  • Loading branch information
stfndamjanovic committed Jan 24, 2024
1 parent 5cdc6f4 commit dec6632
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
class Config
{
/**
* @var float
* @var int
*/
public float $failureThreshold;
public int $failureThreshold;

/**
* @var int
Expand All @@ -22,12 +22,12 @@ class Config
public int $sampleDuration;

/**
* @param float $failureThreshold
* @param int $failureThreshold
* @param int $recoveryTime
* @param int $sampleDuration
*/
public function __construct(
float $failureThreshold = 5,
int $failureThreshold = 5,
int $recoveryTime = 60,
int $sampleDuration = 120
) {
Expand Down Expand Up @@ -55,7 +55,7 @@ public static function fromArray(array $config = []): Config
public function toArray()
{
return [
'failure_ratio' => $this->failureThreshold,
'failure_threshold' => $this->failureThreshold,
'recovery_time' => $this->recoveryTime,
'sample_duration' => $this->sampleDuration,
];
Expand Down

0 comments on commit dec6632

Please sign in to comment.