Skip to content

Commit bc932e1

Browse files
committed
modernize message
1 parent 358ef15 commit bc932e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Assert/Filter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ public static function boolean(callable $filter): void
2222
} elseif (is_object($filter)) {
2323
$reflection = new ReflectionMethod($filter, '__invoke');
2424
} else {
25-
throw new InvalidArgumentException('Expected Closure or invokable object, string given');
25+
throw new InvalidArgumentException(
26+
sprintf('Expected Closure or invokable object, %s given', gettype($filter))
27+
);
2628
}
2729

2830
$returnType = $reflection->getReturnType();

0 commit comments

Comments
 (0)