Skip to content

Commit 37b2df9

Browse files
Adjust pretty name of closures on PHP 8.4
1 parent ae1d949 commit 37b2df9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Caster/ReflectionCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static function castClosure(\Closure $c, array $a, Stub $stub, bool $isNe
4242

4343
$a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter);
4444

45-
if (!str_contains($c->name, '{closure}')) {
45+
if (!str_contains($c->name, '{closure')) {
4646
$stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name;
4747
unset($a[$prefix.'class']);
4848
}

0 commit comments

Comments
 (0)