| @@ -1,0 +1,26 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +declare(strict_types=1); | |
| 4 | + | |
| 5 | +namespace Metricool\Http\Metricool\DTOs; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * This class represents a TimelineStatistic of one of the results of | |
| 9 | + * the TimelineStatistic Entity. Every result of the Metricool timeline can | |
| 10 | + * be hydrated into this DTO. | |
| 11 | + * {@see \Metricool\Http\Metricool\Entities\TimelineStatistics::hydrateItem()} | |
| 12 | + */ | |
| 13 | +class TimelineDTO extends DTO | |
| 14 | +{ | |
| 15 | + public int $timestamp; | |
| 16 | + public float $amount; | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * Constructor to fill all the properties of the TimelineStatistic | |
| 20 | + */ | |
| 21 | + public function __construct(int $timestamp, float $amount) | |
| 22 | + { | |
| 23 | + $this->timestamp = $timestamp; | |
| 24 | + $this->amount = $amount; | |
| 25 | + } | |
| 26 | +} | |