@@ -26,46 +26,59 @@ public function __construct(
2626 * @param string|null $from The sender ID (optional)
2727 * @param string|null $driver The SMS provider to use (optional)
2828 * @param array $metadata Additional metadata (optional)
29+ * @return self
2930 */
3031 public static function create (
3132 string $ message ,
3233 ?string $ from = null ,
3334 ?string $ driver = null ,
3435 array $ metadata = []
35- ): static {
36- return new static ($ message , $ from , $ driver , $ metadata );
36+ ): self {
37+ return new self ($ message , $ from , $ driver , $ metadata );
3738 }
3839
3940 /**
4041 * Set the SMS message content
42+ *
43+ * @param string $message
44+ * @return self
4145 */
42- public function message (string $ message ): static
46+ public function message (string $ message ): self
4347 {
44- return new static ($ message , $ this ->from , $ this ->driver , $ this ->metadata );
48+ return new self ($ message , $ this ->from , $ this ->driver , $ this ->metadata );
4549 }
4650
4751 /**
4852 * Set the sender ID
53+ *
54+ * @param string $from
55+ * @return self
4956 */
50- public function from (string $ from ): static
57+ public function from (string $ from ): self
5158 {
52- return new static ($ this ->message , $ from , $ this ->driver , $ this ->metadata );
59+ return new self ($ this ->message , $ from , $ this ->driver , $ this ->metadata );
5360 }
5461
5562 /**
5663 * Set the SMS provider/driver
64+ *
65+ * @param string $driver
66+ * @return self
5767 */
58- public function driver (string $ driver ): static
68+ public function driver (string $ driver ): self
5969 {
60- return new static ($ this ->message , $ this ->from , $ driver , $ this ->metadata );
70+ return new self ($ this ->message , $ this ->from , $ driver , $ this ->metadata );
6171 }
6272
6373 /**
6474 * Set metadata
75+ *
76+ * @param array $metadata
77+ * @return self
6578 */
66- public function metadata (array $ metadata ): static
79+ public function metadata (array $ metadata ): self
6780 {
68- return new static ($ this ->message , $ this ->from , $ this ->driver , $ metadata );
81+ return new self ($ this ->message , $ this ->from , $ this ->driver , $ metadata );
6982 }
7083
7184 /**
0 commit comments