Skip to content

Commit 29b8779

Browse files
authored
fix: initialize properties in Alert class and update new method signature (#529)
1 parent fe865fe commit 29b8779

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/Alert.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66

77
class Alert
88
{
9-
protected ?string $type;
9+
protected ?string $type = null;
1010

11-
protected ?string $title;
11+
protected ?string $title = null;
1212

13-
protected ?string $detail;
13+
protected ?string $detail = null;
1414

15-
protected ?array $buttons;
15+
protected ?array $buttons = null;
1616

17-
protected ?int $defaultId;
17+
protected ?int $defaultId = null;
1818

19-
protected ?int $cancelId;
19+
protected ?int $cancelId = null;
2020

2121
final public function __construct(protected Client $client) {}
2222

23-
public static function new()
23+
public static function new(): self
2424
{
2525
return new static(new Client);
2626
}

src/Facades/Alert.php

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Support\Facades\Facade;
66

77
/**
8+
* @method static static new()
89
* @method static static type(string $type)
910
* @method static static title(string $title)
1011
* @method static static detail(string $detail)

0 commit comments

Comments
 (0)