Skip to content

Commit

Permalink
Cast to int some settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sidz committed Mar 24, 2024
1 parent a77640f commit 3e9905e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Index/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function setNumberOfReplicas(int $replicas): Response
*/
public function getNumberOfReplicas(): int
{
return $this->get('number_of_replicas') ?? self::DEFAULT_NUMBER_OF_REPLICAS;
return (int) ($this->get('number_of_replicas') ?? self::DEFAULT_NUMBER_OF_REPLICAS);
}

/**
Expand All @@ -197,7 +197,7 @@ public function getNumberOfReplicas(): int
*/
public function getNumberOfShards(): int
{
return $this->get('number_of_shards') ?? self::DEFAULT_NUMBER_OF_SHARDS;
return (int) ($this->get('number_of_shards') ?? self::DEFAULT_NUMBER_OF_SHARDS);
}

/**
Expand Down

0 comments on commit 3e9905e

Please sign in to comment.