Skip to content

Commit

Permalink
make whenNot accept callback as well
Browse files Browse the repository at this point in the history
  • Loading branch information
devmoath committed Nov 5, 2021
1 parent 7a5a638 commit 1375ffd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Jql.php
Expand Up @@ -141,6 +141,8 @@ public function when(mixed $value, callable $callback): self

public function whenNot(mixed $value, callable $callback): self
{
$value = value($value, $this);

if (! $value) {
return $callback($this, $value);
}
Expand Down

0 comments on commit 1375ffd

Please sign in to comment.