changes
This commit is contained in:
@ -63,9 +63,21 @@ abstract class DataCollector implements DataCollectorInterface
|
||||
$casters = [
|
||||
'*' => function ($v, array $a, Stub $s, $isNested) {
|
||||
if (!$v instanceof Stub) {
|
||||
$b = $a;
|
||||
foreach ($a as $k => $v) {
|
||||
if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) {
|
||||
$a[$k] = new CutStub($v);
|
||||
if (!\is_object($v) || $v instanceof \DateTimeInterface || $v instanceof Stub) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
$a[$k] = $s = new CutStub($v);
|
||||
|
||||
if ($b[$k] === $s) {
|
||||
// we've hit a non-typed reference
|
||||
$a[$k] = $v;
|
||||
}
|
||||
} catch (\TypeError $e) {
|
||||
// we've hit a typed reference
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
'line' => $r->getStartLine(),
|
||||
];
|
||||
|
||||
if (str_contains($r->name, '{closure}')) {
|
||||
if (str_contains($r->name, '{closure')) {
|
||||
return $controller;
|
||||
}
|
||||
$controller['method'] = $r->name;
|
||||
|
Reference in New Issue
Block a user