mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-01 15:14:11 +01:00
⬆️ N°4770 Update to latest Symfony 3.4
This commit is contained in:
10
lib/symfony/cache/Simple/ArrayCache.php
vendored
10
lib/symfony/cache/Simple/ArrayCache.php
vendored
@@ -58,7 +58,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte
|
||||
if ($keys instanceof \Traversable) {
|
||||
$keys = iterator_to_array($keys, false);
|
||||
} elseif (!\is_array($keys)) {
|
||||
throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
|
||||
throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
|
||||
}
|
||||
foreach ($keys as $key) {
|
||||
CacheItem::validateKey($key);
|
||||
@@ -73,7 +73,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte
|
||||
public function deleteMultiple($keys)
|
||||
{
|
||||
if (!\is_array($keys) && !$keys instanceof \Traversable) {
|
||||
throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
|
||||
throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
|
||||
}
|
||||
foreach ($keys as $key) {
|
||||
$this->delete($key);
|
||||
@@ -98,7 +98,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte
|
||||
public function setMultiple($values, $ttl = null)
|
||||
{
|
||||
if (!\is_array($values) && !$values instanceof \Traversable) {
|
||||
throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values)));
|
||||
throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given.', \is_object($values) ? \get_class($values) : \gettype($values)));
|
||||
}
|
||||
$valuesArray = [];
|
||||
|
||||
@@ -121,7 +121,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte
|
||||
}
|
||||
}
|
||||
}
|
||||
$expiry = 0 < $ttl ? time() + $ttl : PHP_INT_MAX;
|
||||
$expiry = 0 < $ttl ? time() + $ttl : \PHP_INT_MAX;
|
||||
|
||||
foreach ($valuesArray as $key => $value) {
|
||||
$this->values[$key] = $value;
|
||||
@@ -143,6 +143,6 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte
|
||||
return 0 < $ttl ? $ttl : false;
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given', \is_object($ttl) ? \get_class($ttl) : \gettype($ttl)));
|
||||
throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', \is_object($ttl) ? \get_class($ttl) : \gettype($ttl)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user