| Total Complexity | 6 |
| Total Lines | 77 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Point extends Entity |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | * @JMS\Type("int") |
||
| 16 | * @JMS\SerializedName("metric_id") |
||
| 17 | */ |
||
| 18 | protected $metricId; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | * @JMS\Type("int") |
||
| 23 | * @JMS\SerializedName("value") |
||
| 24 | */ |
||
| 25 | protected $value; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var int |
||
| 29 | * @JMS\Type("int") |
||
| 30 | * @JMS\SerializedName("timestamp") |
||
| 31 | */ |
||
| 32 | protected $timestamp; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Point constructor. |
||
| 36 | */ |
||
| 37 | public function __construct() |
||
| 38 | { |
||
| 39 | $this->timestamp = time(); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return int |
||
| 44 | */ |
||
| 45 | public function getMetricId() |
||
| 46 | { |
||
| 47 | return $this->metricId; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param int $metricId |
||
| 52 | * |
||
| 53 | * @return Point |
||
| 54 | */ |
||
| 55 | public function setMetricId($metricId) |
||
| 56 | { |
||
| 57 | $this->metricId = $metricId; |
||
| 58 | |||
| 59 | return $this; |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return int |
||
| 64 | */ |
||
| 65 | public function getValue() |
||
| 66 | { |
||
| 67 | return $this->value; |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @param int $value |
||
| 72 | * |
||
| 73 | * @return Point |
||
| 74 | */ |
||
| 75 | public function setValue($value) |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return int |
||
| 84 | */ |
||
| 85 | public function getTimestamp(): int |
||
| 88 | } |
||
| 89 | } |
||
| 90 |