We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9931c40 commit cb9fd2eCopy full SHA for cb9fd2e
src/Dto/MatchV5/MatchDetailDto.php
@@ -34,6 +34,8 @@ class MatchDetailDto extends BaseDto
34
public $gameCreation;
35
/** @var \RiotQuest\Dto\DateTime */
36
public $gameStartTimestamp;
37
+ /** @var \RiotQuest\Dto\DateTime */
38
+ public $gameEndTimestamp;
39
/** @var ParticipantDto[] */
40
public $participants;
41
/** @var TeamDto[] */
@@ -66,6 +68,10 @@ public function getGameDurationOrigin() {
66
68
* @return int|float
67
69
*/
70
public function getGameDurationSecond() {
71
+ if ($this->gameStartTimestamp && $this->gameEndTimestamp) {
72
+ return (int)($this->gameEndTimestamp->getTimestamp() - $this->gameStartTimestamp->getTimestamp());
73
+ }
74
+
75
return (int)($this->gameDuration / 1000);
76
}
77
0 commit comments