Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / var-dumper / Cloner / Data.php
index 75ded2912126f2b7bba03c610021ea35a321962a..8e4700d84b729d6c482bd443cf11f64a28f7a623 100644 (file)
@@ -44,7 +44,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
             $item = $item->value;
         }
         if (!$item instanceof Stub) {
-            return gettype($item);
+            return \gettype($item);
         }
         if (Stub::TYPE_STRING === $item->type) {
             return 'string';
@@ -63,7 +63,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
     /**
      * @param bool $recursive Whether values should be resolved recursively or not
      *
-     * @return string|int|float|bool|array|null|Data[] A native representation of the original value
+     * @return string|int|float|bool|array|Data[]|null A native representation of the original value
      */
     public function getValue($recursive = false)
     {
@@ -106,13 +106,13 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
 
     public function count()
     {
-        return count($this->getValue());
+        return \count($this->getValue());
     }
 
     public function getIterator()
     {
-        if (!is_array($value = $this->getValue())) {
-            throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, gettype($value)));
+        if (!\is_array($value = $this->getValue())) {
+            throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, \gettype($value)));
         }
 
         foreach ($value as $k => $v) {
@@ -158,11 +158,11 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
     {
         $value = $this->getValue();
 
-        if (!is_array($value)) {
+        if (!\is_array($value)) {
             return (string) $value;
         }
 
-        return sprintf('%s (count=%d)', $this->getType(), count($value));
+        return sprintf('%s (count=%d)', $this->getType(), \count($value));
     }
 
     /**
@@ -172,7 +172,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
      */
     public function getRawData()
     {
-        @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the array or object access instead.', __METHOD__));
+        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the array or object access instead.', __METHOD__));
 
         return $this->data;
     }
@@ -312,7 +312,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
                 $cursor->hardRefCount = $item->refCount;
             }
             $cursor->attr = $item->attr;
-            $type = $item->class ?: gettype($item->value);
+            $type = $item->class ?: \gettype($item->value);
             $item = $this->getStub($item->value);
         }
         if ($item instanceof Stub) {
@@ -334,7 +334,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
 
                 if ($cursor->stop) {
                     if ($cut >= 0) {
-                        $cut += count($children);
+                        $cut += \count($children);
                     }
                     $children = array();
                 }
@@ -363,7 +363,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
                             $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class);
                         }
                     } elseif ($children && 0 <= $cut) {
-                        $cut += count($children);
+                        $cut += \count($children);
                     }
                     $cursor->skipChildren = false;
                     $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut);
@@ -401,7 +401,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
         ++$cursor->depth;
         $cursor->hashType = $hashType;
         $cursor->hashIndex = 0;
-        $cursor->hashLength = count($children);
+        $cursor->hashLength = \count($children);
         $cursor->hashCut = $hashCut;
         foreach ($children as $key => $child) {
             $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key);