File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " trophy/php" ,
3- "version" : " 1.0.26 " ,
3+ "version" : " 1.0.27 " ,
44 "description" : " Trophy PHP Library" ,
55 "keywords" : [
66 " trophy" ,
Original file line number Diff line number Diff line change 1313class LeaderboardEvent extends JsonSerializableType
1414{
1515 /**
16- * @var DateTime $time The timestamp when the event occurred.
16+ * @var ? DateTime $timestamp The timestamp when the event occurred.
1717 */
18- #[JsonProperty('time ' ), Date(Date::TYPE_DATETIME )]
19- public DateTime $ time ;
18+ #[JsonProperty('timestamp ' ), Date(Date::TYPE_DATETIME )]
19+ public ? DateTime $ timestamp ;
2020
2121 /**
2222 * @var ?int $previousRank The user's rank before this event, or null if they were not on the leaderboard.
@@ -44,17 +44,17 @@ class LeaderboardEvent extends JsonSerializableType
4444
4545 /**
4646 * @param array{
47- * time: DateTime,
47+ * timestamp?: ? DateTime,
4848 * previousRank?: ?int,
4949 * rank?: ?int,
5050 * previousValue?: ?int,
5151 * value?: ?int,
5252 * } $values
5353 */
5454 public function __construct (
55- array $ values ,
55+ array $ values = [] ,
5656 ) {
57- $ this ->time = $ values ['time ' ] ;
57+ $ this ->timestamp = $ values ['timestamp ' ] ?? null ;
5858 $ this ->previousRank = $ values ['previousRank ' ] ?? null ;
5959 $ this ->rank = $ values ['rank ' ] ?? null ;
6060 $ this ->previousValue = $ values ['previousValue ' ] ?? null ;
You can’t perform that action at this time.
0 commit comments