mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
⬆️ N°4770 Update to latest Symfony 3.4
This commit is contained in:
10
lib/symfony/cache/Simple/AbstractCache.php
vendored
10
lib/symfony/cache/Simple/AbstractCache.php
vendored
@@ -45,7 +45,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re
|
||||
$this->defaultLifetime = max(0, (int) $defaultLifetime);
|
||||
$this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':';
|
||||
if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) {
|
||||
throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s")', $this->maxIdLength - 24, \strlen($namespace), $namespace));
|
||||
throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re
|
||||
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)));
|
||||
}
|
||||
$ids = [];
|
||||
|
||||
@@ -109,7 +109,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re
|
||||
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)));
|
||||
}
|
||||
$valuesById = [];
|
||||
|
||||
@@ -147,7 +147,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re
|
||||
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)));
|
||||
}
|
||||
|
||||
return $this->deleteItems($keys);
|
||||
@@ -165,7 +165,7 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, Re
|
||||
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)));
|
||||
}
|
||||
|
||||
private function generateValues($values, &$keys, $default)
|
||||
|
||||
Reference in New Issue
Block a user