Skip to content

Commit 0484be4

Browse files
committed
Update LineMessage.php
1 parent 1127e94 commit 0484be4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Notifications/LineMessage.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ final class LineMessage implements Arrayable
2323

2424
public static function create(?string $text = null): self
2525
{
26-
return (new self())->when(! empty($text), function (self $message) use ($text) {
27-
$message->text($text);
28-
});
26+
return (new self())->unless(empty($text), fn (self $message) => $message->text($text));
2927
}
3028

3129
/**

0 commit comments

Comments
 (0)