fixed CS
This commit is contained in:
parent
b29c567600
commit
fb9808a9e4
@ -261,7 +261,7 @@ class ArrayAdapter implements AdapterInterface, CacheInterface, LoggerAwareInter
|
||||
if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) {
|
||||
return serialize($value);
|
||||
}
|
||||
} elseif (!\is_scalar($value)) {
|
||||
} elseif (!is_scalar($value)) {
|
||||
try {
|
||||
$serialized = serialize($value);
|
||||
} catch (\Exception $e) {
|
||||
|
@ -328,7 +328,7 @@ EOF;
|
||||
$isStaticValue = false;
|
||||
}
|
||||
$value = var_export($value, true);
|
||||
} elseif (!\is_scalar($value)) {
|
||||
} elseif (!is_scalar($value)) {
|
||||
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \gettype($value)));
|
||||
} else {
|
||||
$value = var_export($value, true);
|
||||
|
@ -199,7 +199,7 @@ class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface
|
||||
$isStaticValue = false;
|
||||
}
|
||||
$value = var_export($value, true);
|
||||
} elseif (!\is_scalar($value)) {
|
||||
} elseif (!is_scalar($value)) {
|
||||
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \gettype($value)));
|
||||
} else {
|
||||
$value = var_export($value, true);
|
||||
|
@ -80,7 +80,7 @@ class Serializer implements SerializerInterface, ContextAwareNormalizerInterface
|
||||
}
|
||||
|
||||
if (!($normalizer instanceof NormalizerInterface || $normalizer instanceof DenormalizerInterface)) {
|
||||
throw new InvalidArgumentException(\sprintf('The class "%s" neither implements "%s" nor "%s".', \get_class($normalizer), NormalizerInterface::class, DenormalizerInterface::class));
|
||||
throw new InvalidArgumentException(sprintf('The class "%s" neither implements "%s" nor "%s".', \get_class($normalizer), NormalizerInterface::class, DenormalizerInterface::class));
|
||||
}
|
||||
}
|
||||
$this->normalizers = $normalizers;
|
||||
@ -99,7 +99,7 @@ class Serializer implements SerializerInterface, ContextAwareNormalizerInterface
|
||||
}
|
||||
|
||||
if (!($encoder instanceof EncoderInterface || $encoder instanceof DecoderInterface)) {
|
||||
throw new InvalidArgumentException(\sprintf('The class "%s" neither implements "%s" nor "%s".', \get_class($encoder), EncoderInterface::class, DecoderInterface::class));
|
||||
throw new InvalidArgumentException(sprintf('The class "%s" neither implements "%s" nor "%s".', \get_class($encoder), EncoderInterface::class, DecoderInterface::class));
|
||||
}
|
||||
}
|
||||
$this->encoder = new ChainEncoder($realEncoders);
|
||||
|
Reference in New Issue
Block a user