comparison vendor/symfony/var-dumper/Caster/StubCaster.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
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
28 $stub->value = $c->value; 28 $stub->value = $c->value;
29 $stub->handle = $c->handle; 29 $stub->handle = $c->handle;
30 $stub->cut = $c->cut; 30 $stub->cut = $c->cut;
31 $stub->attr = $c->attr; 31 $stub->attr = $c->attr;
32 32
33 if (Stub::TYPE_REF === $c->type && !$c->class && is_string($c->value) && !preg_match('//u', $c->value)) { 33 if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) {
34 $stub->type = Stub::TYPE_STRING; 34 $stub->type = Stub::TYPE_STRING;
35 $stub->class = Stub::STRING_BINARY; 35 $stub->class = Stub::STRING_BINARY;
36 } 36 }
37 37
38 $a = array(); 38 $a = [];
39 } 39 }
40 40
41 return $a; 41 return $a;
42 } 42 }
43 43
47 } 47 }
48 48
49 public static function cutInternals($obj, array $a, Stub $stub, $isNested) 49 public static function cutInternals($obj, array $a, Stub $stub, $isNested)
50 { 50 {
51 if ($isNested) { 51 if ($isNested) {
52 $stub->cut += count($a); 52 $stub->cut += \count($a);
53 53
54 return array(); 54 return [];
55 } 55 }
56 56
57 return $a; 57 return $a;
58 } 58 }
59 59
64 $stub->handle = 0; 64 $stub->handle = 0;
65 $stub->value = null; 65 $stub->value = null;
66 $stub->cut = $c->cut; 66 $stub->cut = $c->cut;
67 $stub->attr = $c->attr; 67 $stub->attr = $c->attr;
68 68
69 $a = array(); 69 $a = [];
70 70
71 if ($c->value) { 71 if ($c->value) {
72 foreach (array_keys($c->value) as $k) { 72 foreach (array_keys($c->value) as $k) {
73 $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k; 73 $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k;
74 } 74 }