Revert "composer package update"

This reverts commit e979959219e95fc6435ad40f7e60b602f8bbd208.
This commit is contained in:
2020-01-28 00:23:38 +09:00
parent ed69eb5d7b
commit 9cd40b213d
421 changed files with 16273 additions and 14007 deletions
+8 -5
View File
@@ -20,14 +20,14 @@ final class Key
{
private $resource;
private $expiringTime;
private $state = [];
private $state = array();
public function __construct(string $resource)
{
$this->resource = $resource;
}
public function __toString(): string
public function __toString()
{
return $this->resource;
}
@@ -60,7 +60,7 @@ final class Key
/**
* @param float $ttl the expiration delay of locks in seconds
*/
public function reduceLifetime(float $ttl)
public function reduceLifetime($ttl)
{
$newTime = microtime(true) + $ttl;
@@ -74,12 +74,15 @@ final class Key
*
* @return float|null Remaining lifetime in seconds. Null when the key won't expire.
*/
public function getRemainingLifetime(): ?float
public function getRemainingLifetime()
{
return null === $this->expiringTime ? null : $this->expiringTime - microtime(true);
}
public function isExpired(): bool
/**
* @return bool
*/
public function isExpired()
{
return null !== $this->expiringTime && $this->expiringTime <= microtime(true);
}