Mercurial > hg > cmmr2012-drupal-site
diff vendor/symfony/var-dumper/Caster/Caster.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 |
line wrap: on
line diff
--- a/vendor/symfony/var-dumper/Caster/Caster.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/symfony/var-dumper/Caster/Caster.php Thu Feb 28 13:11:55 2019 +0000 @@ -49,14 +49,14 @@ public static function castObject($obj, $class, $hasDebugInfo = false) { if ($class instanceof \ReflectionClass) { - @trigger_error(sprintf('Passing a ReflectionClass to %s() is deprecated since Symfony 3.3 and will be unsupported in 4.0. Pass the class name as string instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('Passing a ReflectionClass to "%s()" is deprecated since Symfony 3.3 and will be unsupported in 4.0. Pass the class name as string instead.', __METHOD__), E_USER_DEPRECATED); $hasDebugInfo = $class->hasMethod('__debugInfo'); $class = $class->name; } if ($hasDebugInfo) { $a = $obj->__debugInfo(); } elseif ($obj instanceof \Closure) { - $a = array(); + $a = []; } else { $a = (array) $obj; } @@ -65,10 +65,10 @@ } if ($a) { - static $publicProperties = array(); + static $publicProperties = []; $i = 0; - $prefixedKeys = array(); + $prefixedKeys = []; foreach ($a as $k => $v) { if (isset($k[0]) ? "\0" !== $k[0] : \PHP_VERSION_ID >= 70200) { if (!isset($publicProperties[$class])) { @@ -109,7 +109,7 @@ * * @return array The filtered array */ - public static function filter(array $a, $filter, array $listedProperties = array(), &$count = 0) + public static function filter(array $a, $filter, array $listedProperties = [], &$count = 0) { $count = 0; @@ -119,13 +119,13 @@ if (null === $v) { $type |= self::EXCLUDE_NULL & $filter; $type |= self::EXCLUDE_EMPTY & $filter; - } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || array() === $v) { + } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { $type |= self::EXCLUDE_EMPTY & $filter; } - if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) { + if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { $type |= self::EXCLUDE_NOT_IMPORTANT; } - if ((self::EXCLUDE_VERBOSE & $filter) && in_array($k, $listedProperties, true)) { + if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) { $type |= self::EXCLUDE_VERBOSE; }