@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add some DateTime handling related PHPDocs

Summary:
As I was fiddling with an exception handling invalid DateTime, add some PHPDoc
for the next time someone needs to understand this code.

Test Plan: Use `get_class()` to check parameters and return values.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25793

+16
+4
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
··· 525 525 } 526 526 } 527 527 528 + /** 529 + * @param PhabricatorSavedQuery $saved 530 + * @return AphrontFormDateControlValue 531 + */ 528 532 private function getQueryDateFrom(PhabricatorSavedQuery $saved) { 529 533 if ($this->calendarYear && $this->calendarMonth) { 530 534 $viewer = $this->requireViewer();
+12
src/view/form/control/AphrontFormDateControlValue.php
··· 209 209 ); 210 210 } 211 211 212 + /** 213 + * Create a DateTime object including timezone 214 + * @param string $date Date, like "2024-08-20" or "2024-07-1" or such 215 + * @param string|null $time Time, like "12:00 AM" or such 216 + * @return DateTime|null 217 + */ 212 218 private function newDateTime($date, $time) { 213 219 $date = $this->getStandardDateFormat($date); 214 220 $time = $this->getStandardTimeFormat($time); ··· 280 286 } 281 287 } 282 288 289 + /** 290 + * @return DateTime|null 291 + */ 283 292 public function getDateTime() { 284 293 return $this->newDateTime($this->valueDate, $this->valueTime); 285 294 } 286 295 296 + /** 297 + * @return DateTimeZone 298 + */ 287 299 private function getTimezone() { 288 300 if ($this->zone) { 289 301 return $this->zone;