diff vendor/symfony/var-dumper/Caster/XmlReaderCaster.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php	Thu Feb 28 13:21:36 2019 +0000
@@ -19,7 +19,7 @@
  */
 class XmlReaderCaster
 {
-    private static $nodeTypes = array(
+    private static $nodeTypes = [
         \XMLReader::NONE => 'NONE',
         \XMLReader::ELEMENT => 'ELEMENT',
         \XMLReader::ATTRIBUTE => 'ATTRIBUTE',
@@ -38,12 +38,12 @@
         \XMLReader::END_ELEMENT => 'END_ELEMENT',
         \XMLReader::END_ENTITY => 'END_ENTITY',
         \XMLReader::XML_DECLARATION => 'XML_DECLARATION',
-    );
+    ];
 
     public static function castXmlReader(\XMLReader $reader, array $a, Stub $stub, $isNested)
     {
         $props = Caster::PREFIX_VIRTUAL.'parserProperties';
-        $info = array(
+        $info = [
             'localName' => $reader->localName,
             'prefix' => $reader->prefix,
             'nodeType' => new ConstStub(self::$nodeTypes[$reader->nodeType], $reader->nodeType),
@@ -55,20 +55,20 @@
             'value' => $reader->value,
             'namespaceURI' => $reader->namespaceURI,
             'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI,
-            $props => array(
+            $props => [
                 'LOADDTD' => $reader->getParserProperty(\XMLReader::LOADDTD),
                 'DEFAULTATTRS' => $reader->getParserProperty(\XMLReader::DEFAULTATTRS),
                 'VALIDATE' => $reader->getParserProperty(\XMLReader::VALIDATE),
                 'SUBST_ENTITIES' => $reader->getParserProperty(\XMLReader::SUBST_ENTITIES),
-            ),
-        );
+            ],
+        ];
 
-        if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, array(), $count)) {
+        if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, [], $count)) {
             $info[$props] = new EnumStub($info[$props]);
             $info[$props]->cut = $count;
         }
 
-        $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, array(), $count);
+        $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, [], $count);
         // +2 because hasValue and hasAttributes are always filtered
         $stub->cut += $count + 2;