Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored Apr 12, 2023
1 parent b9fa03b commit 8080307
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Traits/Activatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ public function isActive(): bool
public function setActive(bool | callable $active = true): static
{
if (is_callable($active)) {
$this->active = $active($this);

return $this;
$active = (bool)$active($this);
}

$this->active = $active;
Expand Down

0 comments on commit 8080307

Please sign in to comment.