Upgrade to 3.5.5

This commit is contained in:
Bastian Allgeier
2021-05-11 11:55:32 +02:00
parent de3560f3d6
commit efeff45192
146 changed files with 2008 additions and 1075 deletions

View File

@@ -25,6 +25,8 @@ class Value
/**
* the number of minutes until the value expires
* @todo Rename this property to $expiry to reflect
* both minutes and absolute timestamps
* @var int
*/
protected $minutes;
@@ -40,7 +42,8 @@ class Value
*
* @param mixed $value
* @param int $minutes the number of minutes until the value expires
* @param int $created the unix timestamp when the value has been created
* or an absolute UNIX timestamp
* @param int $created the UNIX timestamp when the value has been created
*/
public function __construct($value, int $minutes = 0, int $created = null)
{
@@ -72,6 +75,11 @@ class Value
return null;
}
if ($this->minutes > 1000000000) {
// absolute timestamp
return $this->minutes;
}
return $this->created + ($this->minutes * 60);
}
@@ -79,7 +87,7 @@ class Value
* Creates a value object from an array
*
* @param array $array
* @return self
* @return static
*/
public static function fromArray(array $array)
{
@@ -91,7 +99,7 @@ class Value
* returns null on error
*
* @param string $json
* @return self|null
* @return static|null
*/
public static function fromJson(string $json)
{