@@ -16,35 +16,36 @@ class Notification extends AbstractApi
1616{
1717 /**
1818 * Get a listing of notifications
19+ *
1920 * @link https://developer.github.com/v3/activity/notifications/
2021 *
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
2425 *
2526 * @return array array of notifications
2627 */
27- public function all ($ includingRead = false , $ participating = false , $ since = null )
28+ public function all ($ includingRead = false , $ participating = false , DateTime $ since = null )
2829 {
2930 $ parameters = array (
3031 'all ' => $ includingRead ,
3132 'participating ' => $ participating
3233 );
3334
3435 if ($ since !== null ) {
35- $ parameters ['since ' ] = $ since ;
36+ $ parameters ['since ' ] = $ since-> format (DateTime:: ISO8601 ) ;
3637 }
3738
3839 return $ this ->get ('notifications ' , $ parameters );
3940 }
4041
4142 /**
4243 * 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
4445 *
4546 * @link https://developer.github.com/v3/activity/notifications/#mark-as-read
4647 *
47- * @param \ DateTime $since
48+ * @param DateTime|null $since
4849 */
4950 public function markRead (DateTime $ since = null )
5051 {
0 commit comments