| Total Complexity | 6 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class Date extends TdObject |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'date'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Day of the month, 1-31. |
||
| 20 | */ |
||
| 21 | protected int $day; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Month, 1-12. |
||
| 25 | */ |
||
| 26 | protected int $month; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Year, 1-9999. |
||
| 30 | */ |
||
| 31 | protected int $year; |
||
| 32 | |||
| 33 | public function __construct(int $day, int $month, int $year) |
||
| 34 | { |
||
| 35 | $this->day = $day; |
||
| 36 | $this->month = $month; |
||
| 37 | $this->year = $year; |
||
| 38 | } |
||
| 39 | |||
| 40 | public static function fromArray(array $array): Date |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function typeSerialize(): array |
||
| 56 | ]; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function getDay(): int |
||
| 62 | } |
||
| 63 | |||
| 64 | public function getMonth(): int |
||
| 65 | { |
||
| 66 | return $this->month; |
||
| 67 | } |
||
| 68 | |||
| 69 | public function getYear(): int |
||
| 72 | } |
||
| 73 | } |
||
| 74 |