Skip to content

Commit 1630d07

Browse files
committed
Make optional message properties really optional in the code by defaulting to null
1 parent 0698f1a commit 1630d07

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/PushoverMessage.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,67 +24,67 @@ class PushoverMessage
2424
/**
2525
* The (optional) title of the message.
2626
*
27-
* @var string
27+
* @var string|null
2828
*/
29-
public string $title;
29+
public string|null $title = null;
3030

3131
/**
3232
* The (optional) timestamp of the message.
3333
*
34-
* @var int
34+
* @var int|null
3535
*/
36-
public int $timestamp;
36+
public int|null $timestamp = null;
3737

3838
/**
3939
* The (optional) priority of the message.
4040
*
41-
* @var int
41+
* @var int|null
4242
*/
43-
public int $priority;
43+
public int|null $priority = null;
4444

4545
/**
4646
* The (optional) timeout between retries when sending a message
4747
* with an emergency priority. The timeout is in seconds.
4848
*
4949
* @var int|null
5050
*/
51-
public int|null $retry;
51+
public int|null $retry = null;
5252

5353
/**
5454
* The (optional) expire time of a message with an emergency priority.
5555
* The expire time is in seconds.
5656
*
5757
* @var int|null
5858
*/
59-
public int|null $expire;
59+
public int|null $expire = null;
6060

6161
/**
6262
* The (optional) supplementary url of the message.
6363
*
64-
* @var string
64+
* @var string|null
6565
*/
66-
public string $url;
66+
public string|null $url = null;
6767

6868
/**
6969
* The (optional) supplementary url title of the message.
7070
*
71-
* @var string
71+
* @var string|null
7272
*/
73-
public string $urlTitle;
73+
public string|null $urlTitle = null;
7474

7575
/**
7676
* The (optional) sound of the message.
7777
*
78-
* @var string
78+
* @var string|null
7979
*/
80-
public string $sound;
80+
public string|null $sound = null;
8181

8282
/**
8383
* The (optional) image to be attached to the message.
8484
*
85-
* @var string
85+
* @var string|null
8686
*/
87-
public string $image = '';
87+
public string|null $image = null;
8888

8989
/**
9090
* Message formats.

0 commit comments

Comments
 (0)