@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.

PhpDoc: Misc corrections and additions

Summary: Some PhpDoc corrections and additions as I've been poking some code.

Test Plan: Read code; run static code analysis.

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

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

+113 -7
+5
src/applications/base/PhabricatorApplication.php
··· 293 293 /* -( Email Integration )-------------------------------------------------- */ 294 294 295 295 296 + /** 297 + * Whether the application supports inbound email 298 + * 299 + * @return bool 300 + */ 296 301 public function supportsEmailIntegration() { 297 302 return false; 298 303 }
+22 -1
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
··· 15 15 return PhabricatorCalendarApplication::class; 16 16 } 17 17 18 + /** 19 + * @return PhabricatorCalendarEventQuery 20 + */ 18 21 public function newQuery() { 19 22 $viewer = $this->requireViewer(); 20 23 ··· 103 106 return $query; 104 107 } 105 108 109 + /** 110 + * @return PhabricatorCalendarEventQuery 111 + */ 106 112 protected function buildQueryFromParameters(array $map) { 107 113 $query = $this->newQuery(); 108 114 $viewer = $this->requireViewer(); ··· 279 285 return parent::buildSavedQueryFromBuiltin($query_key); 280 286 } 281 287 288 + /** 289 + * @param array<PhabricatorCalendarEvent> $events 290 + * @param PhabricatorSavedQuery $query 291 + * @param array<PhabricatorObjectHandle> $handles 292 + * @return PhabricatorApplicationSearchResultView 293 + */ 282 294 protected function renderResultList( 283 295 array $events, 284 296 PhabricatorSavedQuery $query, ··· 298 310 /** 299 311 * @param array<PhabricatorCalendarEvent> $events 300 312 * @param PhabricatorSavedQuery $query 313 + * @return PhabricatorApplicationSearchResultView 301 314 */ 302 315 private function buildCalendarListView( 303 316 array $events, ··· 351 364 /** 352 365 * @param array<PhabricatorCalendarEvent> $events 353 366 * @param PhabricatorSavedQuery $query 367 + * @return PhabricatorApplicationSearchResultView 354 368 */ 355 369 private function buildCalendarMonthView( 356 370 array $events, ··· 428 442 ->setHeader($header); 429 443 } 430 444 445 + /** 446 + * @param array<PhabricatorCalendarEvent> $events 447 + * @param PhabricatorSavedQuery $query 448 + * @return PhabricatorApplicationSearchResultView 449 + */ 431 450 private function buildCalendarDayView( 432 451 array $events, 433 452 PhabricatorSavedQuery $query) { ··· 660 679 ); 661 680 } 662 681 663 - 682 + /** 683 + * @return PhabricatorApplicationSearchResultView 684 + */ 664 685 private function newResultView($content = null) { 665 686 // If we aren't rendering a dashboard panel, activate global drag-and-drop 666 687 // so you can import ".ics" files by dropping them directly onto the
+1 -1
src/applications/calendar/worker/PhabricatorCalendarImportReloadWorker.php
··· 32 32 } 33 33 34 34 /** 35 - * @return PhabricatorCalendarImportQuery 35 + * @return PhabricatorCalendarImport 36 36 */ 37 37 private function loadImport() { 38 38 $viewer = PhabricatorUser::getOmnipotentUser();
+6
src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php
··· 7 7 return 'email'; 8 8 } 9 9 10 + /** 11 + * Whether to show this panel on the application configuration page, 12 + * depending on whether the application supports inbound email 13 + * 14 + * @return bool 15 + */ 10 16 public function shouldShowForApplication( 11 17 PhabricatorApplication $application) { 12 18 return $application->supportsEmailIntegration();
+12
src/applications/people/storage/PhabricatorUser.php
··· 1090 1090 return $this->getPHID() && ($viewer->getPHID() === $this->getPHID()); 1091 1091 } 1092 1092 1093 + /** 1094 + * @return string|null 1095 + */ 1093 1096 public function describeAutomaticCapability($capability) { 1094 1097 switch ($capability) { 1095 1098 case PhabricatorPolicyCapability::CAN_EDIT: ··· 1191 1194 /* -( PhabricatorSSHPublicKeyInterface )----------------------------------- */ 1192 1195 1193 1196 1197 + /** 1198 + * @return string 1199 + */ 1194 1200 public function getSSHPublicKeyManagementURI(PhabricatorUser $viewer) { 1195 1201 if ($viewer->getPHID() == $this->getPHID()) { 1196 1202 // If the viewer is managing their own keys, take them to the normal ··· 1420 1426 /* -( PhabricatorAuthPasswordHashInterface )------------------------------- */ 1421 1427 1422 1428 1429 + /** 1430 + * @return PhutilOpaqueEnvelope 1431 + */ 1423 1432 public function newPasswordDigest( 1424 1433 PhutilOpaqueEnvelope $envelope, 1425 1434 PhabricatorAuthPassword $password) { ··· 1505 1514 return new PhutilOpaqueEnvelope($digest); 1506 1515 } 1507 1516 1517 + /** 1518 + * @return array<string> 1519 + */ 1508 1520 public function newPasswordBlocklist( 1509 1521 PhabricatorUser $viewer, 1510 1522 PhabricatorAuthPasswordEngine $engine) {
+3 -3
src/applications/project/controller/PhabricatorProjectBoardImportController.php
··· 126 126 /** 127 127 * Starting from a milestone, get the previous milestone, 128 128 * but only if it has at least one column that could be imported. 129 - * @param PhabricatorUser $viewer Current user 130 - * @param PhabricatorProject $project Current milestone with no 131 - * workboard yet. 129 + * @param PhabricatorUser $viewer Current user 130 + * @param PhabricatorProject $milestone Current milestone with no 131 + * workboard yet. 132 132 * Technically, this parameter 133 133 * could also be a project, 134 134 * and projects are silently
+3
src/applications/search/controller/PhabricatorApplicationSearchController.php
··· 32 32 return $this; 33 33 } 34 34 35 + /** 36 + * @return AphrontSideNavFilterView 37 + */ 35 38 protected function getNavigation() { 36 39 return $this->navigation; 37 40 }
+8 -1
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 408 408 /** 409 409 * Return a list of field keys which should be hidden from the viewer. 410 410 * 411 - * @return list<string> Fields to hide. 411 + * @return list<string> Fields to hide. 412 412 */ 413 413 protected function getHiddenFields() { 414 414 return array(); 415 415 } 416 416 417 + /** 418 + * @return array<string> 419 + */ 417 420 public function getErrors() { 418 421 return $this->errors; 419 422 } 420 423 424 + /** 425 + * @param string $error 426 + */ 421 427 public function addError($error) { 422 428 $this->errors[] = $error; 423 429 return $this; ··· 972 978 973 979 /** 974 980 * @task dates 981 + * @return void 975 982 */ 976 983 protected function buildDateRange( 977 984 AphrontFormView $form,
+31
src/applications/search/relationship/PhabricatorObjectRelationship.php
··· 31 31 32 32 abstract public function getEdgeConstant(); 33 33 34 + /** 35 + * @return string 36 + */ 34 37 abstract protected function getActionName(); 38 + 39 + /** 40 + * @return string 41 + */ 35 42 abstract protected function getActionIcon(); 36 43 44 + /** 45 + * @return bool 46 + */ 37 47 abstract public function canRelateObjects($src, $dst); 38 48 49 + /** 50 + * @return string 51 + */ 39 52 abstract public function getDialogTitleText(); 53 + 54 + /** 55 + * @return string 56 + */ 40 57 abstract public function getDialogHeaderText(); 58 + 59 + /** 60 + * @return string 61 + */ 41 62 abstract public function getDialogButtonText(); 42 63 64 + /** 65 + * Display additional instructions at the bottom of the dialog 66 + * @return string|null 67 + */ 43 68 public function getDialogInstructionsText() { 44 69 return null; 45 70 } 46 71 72 + /** 73 + * Whether to list the relationship action as a menu item in the 74 + * "Edit Related Objects" menu in the object's side column 75 + * 76 + * @return bool 77 + */ 47 78 public function shouldAppearInActionMenu() { 48 79 return true; 49 80 }
+8
src/applications/transactions/commentaction/PhabricatorEditEngineCommentAction.php
··· 11 11 private $conflictKey; 12 12 private $submitButtonText; 13 13 14 + /** 15 + * @return string Type of the control, for example 'checkboxes', 'points', 16 + * 'remarkup', 'select', 'static', 'tokenizer', etc. 17 + */ 14 18 abstract public function getPHUIXControlType(); 19 + 20 + /** 21 + * @return array 22 + */ 15 23 abstract public function getPHUIXControlSpecification(); 16 24 17 25 public function setKey($key) {
+5
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 5314 5314 } 5315 5315 } 5316 5316 5317 + /** 5318 + * This can only apply to Differential Revisions which are drafts. 5319 + * 5320 + * @return bool 5321 + */ 5317 5322 private function hasWarnings($object, $xaction) { 5318 5323 // TODO: For the moment, this is a very un-modular hack to support 5319 5324 // a small number of warnings related to draft revisions. See PHI433.
+8
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 470 470 return $output; 471 471 } 472 472 473 + /** 474 + * @return string 475 + */ 473 476 public function getIcon() { 474 477 switch ($this->getTransactionType()) { 475 478 case PhabricatorTransactions::TYPE_COMMENT: ··· 534 537 return array(null, null); 535 538 } 536 539 540 + /** 541 + * @return string|null 542 + */ 537 543 public function getColor() { 538 544 switch ($this->getTransactionType()) { 539 545 case PhabricatorTransactions::TYPE_COMMENT: ··· 1817 1823 /** 1818 1824 * Test if this transaction is just a user subscribing or unsubscribing 1819 1825 * themselves. 1826 + * 1827 + * @return bool 1820 1828 */ 1821 1829 private function isSelfSubscription() { 1822 1830 $type = $this->getTransactionType();
+1 -1
src/docs/contributor/adding_new_classes.diviner
··· 206 206 What You Can Extend And Invoke 207 207 ============================== 208 208 209 - Arcanist and Pohrge are strict about extensibility of classes and 209 + Arcanist and Phorge are strict about extensibility of classes and 210 210 visibility of methods and properties. Most classes are marked `final`, and 211 211 methods have the minimum required visibility (protected or private). The goal 212 212 of this strictness is to make it clear what you can safely extend, access, and