Add phpDoc typehints for magic methods
Signed-off-by: Raul <raul@nextcloud.com>
This commit is contained in:
@@ -158,6 +158,17 @@ class Card extends RelationalEntity {
|
|||||||
return $calendar;
|
return $calendar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDaysUntilDue(): int {
|
||||||
|
$today = new DateTime();
|
||||||
|
$today->setTime(0, 0);
|
||||||
|
|
||||||
|
$match_date = $this->getDueDateTime() ?? new DateTime();
|
||||||
|
$match_date->setTime(0, 0);
|
||||||
|
|
||||||
|
$diff = $today->diff($match_date);
|
||||||
|
return (int) $diff->format('%R%a'); // Extract days count in interval
|
||||||
|
}
|
||||||
|
|
||||||
public function getCalendarPrefix(): string {
|
public function getCalendarPrefix(): string {
|
||||||
return 'card';
|
return 'card';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user