Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/serializer/Normalizer/DateIntervalNormalizer.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/vendor/symfony/serializer/Normalizer/DateIntervalNormalizer.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/serializer/Normalizer/DateIntervalNormalizer.php Thu Feb 28 13:21:36 2019 +0000 @@ -39,7 +39,7 @@ * * @throws InvalidArgumentException */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { if (!$object instanceof \DateInterval) { throw new InvalidArgumentException('The object must be an instance of "\DateInterval".'); @@ -64,10 +64,10 @@ * @throws InvalidArgumentException * @throws UnexpectedValueException */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null, array $context = []) { - if (!is_string($data)) { - throw new InvalidArgumentException(sprintf('Data expected to be a string, %s given.', gettype($data))); + if (!\is_string($data)) { + throw new InvalidArgumentException(sprintf('Data expected to be a string, %s given.', \gettype($data))); } if (!$this->isISO8601($data)) {