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

Misc PhpDoc additions or improvements

Summary: Side effect of stuff I've been poking and trying to understand what it may do.

Test Plan: Check parameter and return types, e.g. via gettype() or get_class(). Run phpstan and get a few less complaints.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

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

+76 -2
+3
src/applications/auth/controller/config/PhabricatorAuthEditController.php
··· 3 3 final class PhabricatorAuthEditController 4 4 extends PhabricatorAuthProviderConfigController { 5 5 6 + /** 7 + * @return PhabricatorStandardPageView|AphrontResponse 8 + */ 6 9 public function handleRequest(AphrontRequest $request) { 7 10 $this->requireApplicationCapability( 8 11 AuthManageProvidersCapability::CAPABILITY);
+16 -1
src/applications/auth/provider/PhabricatorAuthProvider.php
··· 64 64 ->execute(); 65 65 } 66 66 67 + /** 68 + * @return array<static> 69 + */ 67 70 public static function getAllProviders() { 68 71 static $providers; 69 72 ··· 99 102 return $providers; 100 103 } 101 104 105 + /** 106 + * @return array<static> 107 + */ 102 108 public static function getAllEnabledProviders() { 103 109 $providers = self::getAllProviders(); 104 110 foreach ($providers as $key => $provider) { ··· 267 273 return $this->didUpdateAccount($account); 268 274 } 269 275 276 + /** 277 + * @return PhabricatorExternalAccount 278 + */ 270 279 private function didUpdateAccount(PhabricatorExternalAccount $account) { 271 280 $adapter = $this->getAdapter(); 272 281 ··· 375 384 return '500-'.$this->getProviderName(); 376 385 } 377 386 387 + /** 388 + * @return string Name of the icon of the auth provider 389 + */ 378 390 protected function getLoginIcon() { 379 391 return 'Generic'; 380 392 } 381 393 394 + /** 395 + * @return PHUIIconView Icon of the auth provider 396 + */ 382 397 public function newIconView() { 383 398 return id(new PHUIIconView()) 384 399 ->setSpriteSheet(PHUIIconView::SPRITE_LOGIN) ··· 464 479 * @param string $mode Request mode string. 465 480 * @param map $attributes (optional) Additional parameters, see 466 481 * above. 467 - * @return wild Log in button. 482 + * @return PhutilSafeHTML Log in button. 468 483 */ 469 484 protected function renderStandardLoginButton( 470 485 AphrontRequest $request,
+3
src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
··· 215 215 return $engine; 216 216 } 217 217 218 + /** 219 + * @return array<PhabricatorActionView> 220 + */ 218 221 public function newHeaderEditActions( 219 222 PhabricatorDashboardPanel $panel, 220 223 PhabricatorUser $viewer,
+3
src/applications/fact/chart/PhabricatorChartFunction.php
··· 55 55 return $this; 56 56 } 57 57 58 + /** 59 + * @return PhabricatorChartFunctionLabel 60 + */ 58 61 public function getFunctionLabel() { 59 62 if (!$this->functionLabel) { 60 63 $this->functionLabel = id(new PhabricatorChartFunctionLabel())
+16
src/applications/fact/chart/PhabricatorChartFunctionLabel.php
··· 14 14 return $this; 15 15 } 16 16 17 + /** 18 + * @return string Internal identifier of the line, e.g. "moved-in" 19 + */ 17 20 public function getKey() { 18 21 return $this->key; 19 22 } ··· 23 26 return $this; 24 27 } 25 28 29 + /** 30 + * @return string User-visible label describing what the line represents, 31 + * e.g. "Open Tasks" 32 + */ 26 33 public function getName() { 27 34 return $this->name; 28 35 } ··· 32 39 return $this; 33 40 } 34 41 42 + /** 43 + * @return string Color of the line, such as 'rgba(128, 128, 200, 1)' 44 + */ 35 45 public function getColor() { 36 46 return $this->color; 37 47 } ··· 50 60 return $this; 51 61 } 52 62 63 + /** 64 + * @return string Color of the area, such as 'rgba(128, 128, 200, 0.15)' 65 + */ 53 66 public function getFillColor() { 54 67 return $this->fillColor; 55 68 } 56 69 70 + /** 71 + * @return array 72 + */ 57 73 public function toWireFormat() { 58 74 return array( 59 75 'key' => $this->getKey(),
+3
src/applications/project/storage/PhabricatorProjectColumn.php
··· 191 191 return $this; 192 192 } 193 193 194 + /** 195 + * @return PhabricatorProjectTrigger|null 196 + */ 194 197 public function getTrigger() { 195 198 return $this->assertAttached($this->trigger); 196 199 }
+13
src/applications/transactions/controller/PhabricatorEditEngineController.php
··· 5 5 6 6 private $engineKey; 7 7 8 + /** 9 + * @param string $engine_key Engine key, e.g. 'maniphest.task' 10 + */ 8 11 public function setEngineKey($engine_key) { 9 12 $this->engineKey = $engine_key; 10 13 return $this; ··· 34 37 return $crumbs; 35 38 } 36 39 40 + /** 41 + * @return PhabricatorEditEngineConfiguration|null 42 + */ 37 43 protected function loadConfigForEdit() { 38 44 return $this->loadConfig($need_edit = true); 39 45 } 40 46 47 + /** 48 + * @return PhabricatorEditEngineConfiguration|null 49 + */ 41 50 protected function loadConfigForView() { 42 51 return $this->loadConfig($need_edit = false); 43 52 } 44 53 54 + /** 55 + * @param bool $need_edit 56 + * @return PhabricatorEditEngineConfiguration|null 57 + */ 45 58 private function loadConfig($need_edit) { 46 59 $request = $this->getRequest(); 47 60 $viewer = $this->getViewer();
+6
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 1422 1422 return $fields; 1423 1423 } 1424 1424 1425 + /** 1426 + * @return PHUIButtonView|null 1427 + */ 1425 1428 private function buildEditFormActionButton($object) { 1426 1429 if (!$this->isEngineConfigurable()) { 1427 1430 return null; ··· 1446 1449 return $action_button; 1447 1450 } 1448 1451 1452 + /** 1453 + * @return array<PhabricatorActionView> 1454 + */ 1449 1455 private function buildEditFormActions($object) { 1450 1456 $actions = array(); 1451 1457
+6 -1
src/infrastructure/javelin/markup.php
··· 1 1 <?php 2 2 3 + /** 4 + * @return PhutilSafeHTML 5 + */ 3 6 function javelin_tag( 4 7 $tag, 5 8 array $attributes = array(), ··· 66 69 unset($attributes['print']); 67 70 } 68 71 69 - 70 72 return phutil_tag($tag, $attributes, $content); 71 73 } 72 74 75 + /** 76 + * @return PhutilSafeHTML 77 + */ 73 78 function phabricator_form(PhabricatorUser $user, $attributes, $content) { 74 79 $body = array(); 75 80
+3
src/infrastructure/markup/PhutilRemarkupBlockStorage.php
··· 44 44 private $map = array(); 45 45 private $index = 0; 46 46 47 + /** 48 + * @return string Token in the format <0x01>1234Z 49 + */ 47 50 public function store($text) { 48 51 $key = self::MAGIC_BYTE.(++$this->index).'Z'; 49 52 $this->map[$key] = $text;
+4
src/infrastructure/markup/markuprule/PhutilRemarkupHyperlinkRule.php
··· 80 80 return $this->markupHyperlink('{', $matches); 81 81 } 82 82 83 + /** 84 + * @return string Token in the format <0x01>1234Z. 85 + * See @{class:PhutilRemarkupBlockStorage} for details 86 + */ 83 87 protected function markupHyperlink($mode, array $matches) { 84 88 $raw_uri = $matches[1]; 85 89