Skip to content

Commit

Permalink
Add casting (endclothing#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
L3tum committed Sep 20, 2020
1 parent 70f2182 commit aa82c53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Prometheus/Storage/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ private function connectToServer(): bool
if ($this->options['persistent_connections']) {
return $this->redis->pconnect(
$this->options['host'],
$this->options['port'],
$this->options['timeout']
(int) $this->options['port'],
(float) $this->options['timeout']
);
}

return $this->redis->connect($this->options['host'], $this->options['port'], $this->options['timeout']);
return $this->redis->connect($this->options['host'], (int) $this->options['port'], (float) $this->options['timeout']);
} catch (\RedisException $e) {
return false;
}
Expand Down

0 comments on commit aa82c53

Please sign in to comment.