Mercurial > hg > cmmr2012-drupal-site
diff vendor/symfony/serializer/Normalizer/PropertyNormalizer.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
line wrap: on
line diff
--- a/vendor/symfony/serializer/Normalizer/PropertyNormalizer.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/symfony/serializer/Normalizer/PropertyNormalizer.php Thu Feb 28 13:11:55 2019 +0000 @@ -30,7 +30,7 @@ */ class PropertyNormalizer extends AbstractObjectNormalizer { - private $cache = array(); + private $cache = []; /** * {@inheritdoc} @@ -74,7 +74,7 @@ /** * {@inheritdoc} */ - protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) + protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = []) { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; @@ -95,10 +95,10 @@ /** * {@inheritdoc} */ - protected function extractAttributes($object, $format = null, array $context = array()) + protected function extractAttributes($object, $format = null, array $context = []) { $reflectionObject = new \ReflectionObject($object); - $attributes = array(); + $attributes = []; do { foreach ($reflectionObject->getProperties() as $property) { @@ -116,7 +116,7 @@ /** * {@inheritdoc} */ - protected function getAttributeValue($object, $attribute, $format = null, array $context = array()) + protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { try { $reflectionProperty = $this->getReflectionProperty($object, $attribute); @@ -135,7 +135,7 @@ /** * {@inheritdoc} */ - protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = array()) + protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { try { $reflectionProperty = $this->getReflectionProperty($object, $attribute);