Skip to content

Commit

Permalink
modernize message
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 28, 2024
1 parent 358ef15 commit bc932e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Assert/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public static function boolean(callable $filter): void
} elseif (is_object($filter)) {
$reflection = new ReflectionMethod($filter, '__invoke');
} else {
throw new InvalidArgumentException('Expected Closure or invokable object, string given');
throw new InvalidArgumentException(
sprintf('Expected Closure or invokable object, %s given', gettype($filter))
);
}

$returnType = $reflection->getReturnType();
Expand Down

0 comments on commit bc932e1

Please sign in to comment.