@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: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

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

+52 -6
+2 -2
src/applications/base/PhabricatorApplication.php
··· 477 477 * To check if an application is installed at all, use 478 478 * @{method:isClassInstalled}. 479 479 * 480 - * @param string Application class name. 481 - * @param PhabricatorUser|null Viewing user. 480 + * @param string $class Application class name. 481 + * @param PhabricatorUser|null $viewer Viewing user. 482 482 * @return bool True if the class is installed or if the installed class is 483 483 * available to the viewer when a viewer is given. 484 484 * @task meta
+3
src/applications/base/controller/PhabricatorController.php
··· 454 454 ->setViewer($this->getViewer()); 455 455 } 456 456 457 + /** 458 + * @return PHUICurtainView 459 + */ 457 460 public function newCurtainView($object = null) { 458 461 $viewer = $this->getViewer(); 459 462
+3
src/applications/config/option/PhabricatorApplicationConfigOptions.php
··· 5 5 abstract public function getName(); 6 6 abstract public function getDescription(); 7 7 abstract public function getGroup(); 8 + /** 9 + * @return array<PhabricatorConfigOption> 10 + */ 8 11 abstract public function getOptions(); 9 12 10 13 public function getIcon() {
+6
src/applications/herald/storage/HeraldRule.php
··· 353 353 ); 354 354 } 355 355 356 + /** 357 + * @return string String like 'public', 'users', 'admin', or a User PHID 358 + */ 356 359 public function getPolicy($capability) { 357 360 if ($capability == PhabricatorPolicyCapability::CAN_VIEW) { 358 361 return PhabricatorPolicies::getMostOpenPolicy(); ··· 374 377 return false; 375 378 } 376 379 380 + /** 381 + * @return string|null 382 + */ 377 383 public function describeAutomaticCapability($capability) { 378 384 if ($capability == PhabricatorPolicyCapability::CAN_VIEW) { 379 385 return null;
+17
src/applications/policy/interface/PhabricatorPolicyInterface.php
··· 2 2 3 3 interface PhabricatorPolicyInterface extends PhabricatorPHIDInterface { 4 4 5 + /** 6 + * @return array<PhabricatorPolicyCapability> 7 + */ 5 8 public function getCapabilities(); 9 + 10 + /** 11 + * @param PhabricatorPolicyCapability $capability 12 + * @return string A PhabricatorPolicyConstant 13 + */ 6 14 public function getPolicy($capability); 15 + 16 + /** 17 + * Whether an object provides automatic capability grants to a user (e.g. the 18 + * owner of an object can always see it even if a capability is set to NOONE) 19 + * 20 + * @param PhabricatorPolicyCapability $capability 21 + * @param PhabricatorUser $viewer 22 + * @return bool 23 + */ 7 24 public function hasAutomaticCapability($capability, PhabricatorUser $viewer); 8 25 9 26 }
+4
src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php
··· 34 34 return $form; 35 35 } 36 36 37 + /** 38 + * Attach forms to menu items shown in top bar Favorites dropdown 39 + * @param array<PhabricatorProfileMenuItemConfiguration> $items 40 + */ 37 41 public function willGetMenuItemViewList(array $items) { 38 42 $viewer = $this->getViewer(); 39 43 $engines = PhabricatorEditEngine::getAllEditEngines();
+6
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 78 78 return true; 79 79 } 80 80 81 + /** 82 + * Whether this EditEngine creates by default an entry in the Favorites 83 + * dropdown in the top bar to use the Default Form for this EditEngine 84 + * 85 + * @return bool 86 + */ 81 87 public function isDefaultQuickCreateEngine() { 82 88 return false; 83 89 }
+1 -2
src/infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php
··· 47 47 $next = new DateTime("{$ymd} {$hms} UTC"); 48 48 49 49 // Add a day. 50 - // NOTE: DateInterval doesn't exist until PHP 5.3.0, and we currently 51 - // target PHP 5.2.3. 50 + // TODO: Use PHP's DateInterval instead which exists since PHP 5.3.0 52 51 $next->modify('+1 day'); 53 52 54 53 return (int)$next->format('U');
+1 -1
src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php
··· 475 475 * automatically populated as a side effect of objects surviving policy 476 476 * filtering. 477 477 * 478 - * @param array<phid, PhabricatorPolicyInterface> $objects Objects to add to 478 + * @param array<PhabricatorPolicyInterface> $objects Objects to add to 479 479 * the query workspace. 480 480 * @return $this 481 481 * @task workspace
+7
src/view/form/control/AphrontFormTextAreaControl.php
··· 32 32 return $this->placeHolder; 33 33 } 34 34 35 + /** 36 + * @param string $height One of the AphrontFormTextAreaControl::HEIGHT_* 37 + * variables 38 + */ 35 39 public function setHeight($height) { 36 40 $this->height = $height; 37 41 return $this; ··· 55 59 return $this; 56 60 } 57 61 62 + /** 63 + * @return PhutilSafeHTML HTML textarea element 64 + */ 58 65 protected function renderInput() { 59 66 60 67 $height_class = null;
+2 -1
src/view/phui/PHUIInfoView.php
··· 31 31 } 32 32 33 33 /** 34 - * @param string One of the SEVERITY_* constants defined in PHUIInfoView 34 + * @param string $severity One of the SEVERITY_* constants defined in 35 + * PHUIInfoView 35 36 * @return $this 36 37 */ 37 38 public function setSeverity($severity) {