File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,14 @@ public static function boolean(callable $filter): void
3636
3737 if ($ returnType instanceof ReflectionUnionType || $ returnType instanceof ReflectionIntersectionType) {
3838 $ separator = $ returnType instanceof ReflectionUnionType ? '| ' : '& ' ;
39+ /** @var ReflectionNamedType[] $types */
40+ $ types = $ returnType ->getTypes ();
3941 throw new InvalidArgumentException (
4042 sprintf (
4143 'Expected a bool return type on callable filter, %s given ' ,
4244 implode ($ separator , array_map (
43- static fn (ReflectionNamedType $ type ): string => $ type ->getName (),
44- $ returnType -> getTypes ()
45+ static fn (ReflectionNamedType $ reflectionNamedType ): string => $ reflectionNamedType ->getName (),
46+ $ types
4547 ))
4648 )
4749 );
You can’t perform that action at this time.
0 commit comments