@@ -16,35 +16,36 @@ class Notification extends AbstractApi
16
16
{
17
17
/**
18
18
* Get a listing of notifications
19
+ *
19
20
* @link https://developer.github.com/v3/activity/notifications/
20
21
*
21
- * @param bool $includingRead
22
- * @param bool $participating
23
- * @param null $since
22
+ * @param bool $includingRead
23
+ * @param bool $participating
24
+ * @param DateTime| null $since
24
25
*
25
26
* @return array array of notifications
26
27
*/
27
- public function all ($ includingRead = false , $ participating = false , $ since = null )
28
+ public function all ($ includingRead = false , $ participating = false , DateTime $ since = null )
28
29
{
29
30
$ parameters = array (
30
31
'all ' => $ includingRead ,
31
32
'participating ' => $ participating
32
33
);
33
34
34
35
if ($ since !== null ) {
35
- $ parameters ['since ' ] = $ since ;
36
+ $ parameters ['since ' ] = $ since-> format (DateTime:: ISO8601 ) ;
36
37
}
37
38
38
39
return $ this ->get ('notifications ' , $ parameters );
39
40
}
40
41
41
42
/**
42
43
* Marks all notifications as read from the current date
43
- * Optionally give DateTimeInterface to mark as read before that date
44
+ * Optionally give DateTime to mark as read before that date
44
45
*
45
46
* @link https://developer.github.com/v3/activity/notifications/#mark-as-read
46
47
*
47
- * @param \ DateTime $since
48
+ * @param DateTime|null $since
48
49
*/
49
50
public function markRead (DateTime $ since = null )
50
51
{
0 commit comments