| 1 | <?php namespace Arcanedev\LaravelMetrics\Results; |
||
| 9 | class TrendResult extends Result |
||
| 10 | { |
||
| 11 | /* ----------------------------------------------------------------- |
||
| 12 | | Properties |
||
| 13 | | ----------------------------------------------------------------- |
||
| 14 | */ |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The trend data of the result. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | public $trend = []; |
||
| 22 | |||
| 23 | /* ----------------------------------------------------------------- |
||
| 24 | | Setters |
||
| 25 | | ----------------------------------------------------------------- |
||
| 26 | */ |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Set the latest value of the trend as the primary value. |
||
| 30 | * |
||
| 31 | * @return $this |
||
| 32 | */ |
||
| 33 | 4 | public function showLatestValue() |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Set the trend of data for the metric. |
||
| 42 | * |
||
| 43 | * @param array $trend |
||
| 44 | * |
||
| 45 | * @return $this |
||
| 46 | */ |
||
| 47 | 24 | public function trend(array $trend) |
|
| 53 | |||
| 54 | /* ----------------------------------------------------------------- |
||
| 55 | | Other Methods |
||
| 56 | | ----------------------------------------------------------------- |
||
| 57 | */ |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Get the instance as an array. |
||
| 61 | * |
||
| 62 | * @return array |
||
| 63 | */ |
||
| 64 | 8 | public function toArray(): array |
|
| 71 | } |
||
| 72 |