Skip to content

Commit a7a5f73

Browse files
Automatically update PHP SDK
1 parent ddcae68 commit a7a5f73

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "trophy/php",
3-
"version": "1.0.26",
3+
"version": "1.0.27",
44
"description": "Trophy PHP Library",
55
"keywords": [
66
"trophy",

‎src/Types/LeaderboardEvent.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
class 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;

0 commit comments

Comments
 (0)