You've already forked php-flasher
mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-04-05 12:32:55 +01:00
call unless method multiple times
This commit is contained in:
@@ -285,6 +285,11 @@ class NotificationBuilder implements NotificationBuilderInterface
|
||||
*/
|
||||
public function unless($condition)
|
||||
{
|
||||
$stamp = $this->envelope->get('Flasher\Prime\Stamp\UnlessStamp');
|
||||
if ($stamp instanceof UnlessStamp) {
|
||||
$condition = $stamp->getCondition() || $condition;
|
||||
}
|
||||
|
||||
$this->envelope->withStamp(new UnlessStamp($condition));
|
||||
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user