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

Commit

Permalink
BUGFIX: fix type hints so it works better when configured via env var…
Browse files Browse the repository at this point in the history
…iables
  • Loading branch information
skurfuerst committed Apr 21, 2020
1 parent 7a584cf commit cacbe98
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Classes/OptimizedRedisCacheBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,23 +338,23 @@ public function setHostname(string $hostname)
*
* Leave this empty if you want to connect to a socket
*
* @param integer $port Port of the Redis server
* @param integer|string $port Port of the Redis server
* @api
*/
public function setPort(int $port)
public function setPort($port)
{
$this->port = $port;
$this->port = (int)$port;
}

/**
* Sets the database that will be used for this backend
*
* @param integer $database Database that will be used
* @param integer|string $database Database that will be used
* @api
*/
public function setDatabase(int $database)
public function setDatabase($database)
{
$this->database = $database;
$this->database = (int)$database;
}

/**
Expand All @@ -366,11 +366,11 @@ public function setPassword(string $password): void
}

/**
* @param integer $compressionLevel
* @param integer|string $compressionLevel
*/
public function setCompressionLevel(int $compressionLevel)
public function setCompressionLevel($compressionLevel)
{
$this->compressionLevel = $compressionLevel;
$this->compressionLevel = (int)$compressionLevel;
}

/**
Expand Down

0 comments on commit cacbe98

Please sign in to comment.