Skip to content

Commit

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

Expand Down
2 changes: 1 addition & 1 deletion tests/FilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __invoke(int $datum): bool
public function testOnceWithStringFilter(): void
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Expected Closure or invokable object, string given');
$this->expectExceptionMessage('Expected Closure or invokable object on callable filter, string given');

$data = [1, 'f'];
$filter = 'is_string';
Expand Down

0 comments on commit 3f7be10

Please sign in to comment.