comparison vendor/symfony/var-dumper/Cloner/Data.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 5fb285c0d0e3
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
61 } 61 }
62 62
63 /** 63 /**
64 * @param bool $recursive Whether values should be resolved recursively or not 64 * @param bool $recursive Whether values should be resolved recursively or not
65 * 65 *
66 * @return scalar|array|null|Data[] A native representation of the original value 66 * @return string|int|float|bool|array|null|Data[] A native representation of the original value
67 */ 67 */
68 public function getValue($recursive = false) 68 public function getValue($recursive = false)
69 { 69 {
70 $item = $this->data[$this->position][$this->key]; 70 $item = $this->data[$this->position][$this->key];
71 71
170 * 170 *
171 * @deprecated since version 3.3. Use array or object access instead. 171 * @deprecated since version 3.3. Use array or object access instead.
172 */ 172 */
173 public function getRawData() 173 public function getRawData()
174 { 174 {
175 @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Use the array or object access instead.', __METHOD__)); 175 @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__));
176 176
177 return $this->data; 177 return $this->data;
178 } 178 }
179 179
180 /** 180 /**
354 case Stub::TYPE_OBJECT: 354 case Stub::TYPE_OBJECT:
355 case Stub::TYPE_RESOURCE: 355 case Stub::TYPE_RESOURCE:
356 $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; 356 $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth;
357 $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); 357 $dumper->enterHash($cursor, $item->type, $item->class, $withChildren);
358 if ($withChildren) { 358 if ($withChildren) {
359 $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); 359 if ($cursor->skipChildren) {
360 $withChildren = false;
361 $cut = -1;
362 } else {
363 $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class);
364 }
360 } elseif ($children && 0 <= $cut) { 365 } elseif ($children && 0 <= $cut) {
361 $cut += count($children); 366 $cut += count($children);
362 } 367 }
368 $cursor->skipChildren = false;
363 $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); 369 $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut);
364 break; 370 break;
365 371
366 default: 372 default:
367 throw new \RuntimeException(sprintf('Unexpected Stub type: %s', $item->type)); 373 throw new \RuntimeException(sprintf('Unexpected Stub type: %s', $item->type));