@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: Replace non-existing param type phid with string

Summary:
`phid` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html.
Thus set the param type to `string` and get a few less errors reported by PHPStan.

Test Plan: Read docs; run static code analysis.

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/D25940

+47 -47
+1 -1
src/applications/auth/engine/PhabricatorAuthSessionEngine.php
··· 252 252 * 253 253 * @param string $session_type Session type constant (see 254 254 * @{class:PhabricatorAuthSession}). 255 - * @param phid|null $identity_phid Identity to establish a session for, 255 + * @param string|null $identity_phid Identity to establish a session for, 256 256 * usually a user PHID. With `null`, generates an 257 257 * anonymous session. 258 258 * @param bool $partial True to issue a partial session.
+3 -3
src/applications/drydock/storage/DrydockAuthorization.php
··· 104 104 * blueprint selector control an object. 105 105 * 106 106 * @param PhabricatorUser $viewer User applying the change. 107 - * @param phid $object_phid Object PHID change is being applied to. 108 - * @param list<phid> $old Old blueprint PHIDs. 109 - * @param list<phid> $new New blueprint PHIDs. 107 + * @param string $object_phid Object PHID change is being applied to. 108 + * @param list<string> $old Old blueprint PHIDs. 109 + * @param list<string> $new New blueprint PHIDs. 110 110 * @return void 111 111 */ 112 112 public static function applyAuthorizationChanges(
+3 -3
src/applications/drydock/storage/DrydockSlotLock.php
··· 43 43 /** 44 44 * Load all locks held by a particular owner. 45 45 * 46 - * @param phid $owner_phid Owner PHID. 46 + * @param string $owner_phid Owner PHID. 47 47 * @return list<DrydockSlotLock> All held locks. 48 48 * @task info 49 49 */ ··· 114 114 * This method either acquires all the locks or throws an exception (usually 115 115 * because one or more locks are held). 116 116 * 117 - * @param phid $owner_phid Lock owner PHID. 117 + * @param string $owner_phid Lock owner PHID. 118 118 * @param list<string> $locks List of locks to acquire. 119 119 * @return void 120 120 * @task locks ··· 158 158 /** 159 159 * Release all locks held by an owner. 160 160 * 161 - * @param phid $owner_phid Lock owner PHID. 161 + * @param string $owner_phid Lock owner PHID. 162 162 * @return void 163 163 * @task locks 164 164 */
+2 -2
src/applications/feed/PhabricatorFeedStoryPublisher.php
··· 214 214 /** 215 215 * Remove PHIDs who should not receive notifications from a subscriber list. 216 216 * 217 - * @param list<phid> $phids List of potential subscribers. 218 - * @return list<phid> List of actual subscribers. 217 + * @param list<string> $phids List of PHIDs of potential subscribers. 218 + * @return list<string> List of PHIDs of actual subscribers. 219 219 */ 220 220 private function filterSubscribedPHIDs(array $phids) { 221 221 $phids = $this->expandRecipients($phids);
+3 -3
src/applications/files/storage/PhabricatorFile.php
··· 1471 1471 * Write the policy edge between this file and some object. 1472 1472 * This method is successful even if the file is already attached. 1473 1473 * 1474 - * @param phid $phid Object PHID to attach to. 1474 + * @param string $phid Object PHID to attach to. 1475 1475 * @return $this 1476 1476 */ 1477 1477 public function attachToObject($phid) { ··· 1485 1485 * NOTE: Please avoid to use this static method directly. 1486 1486 * Instead, use PhabricatorFile#attachToObject(phid). 1487 1487 * 1488 - * @param phid $file_phid File PHID to attach from. 1489 - * @param phid $object_phid Object PHID to attach to. 1488 + * @param string $file_phid File PHID to attach from. 1489 + * @param string $object_phid Object PHID to attach to. 1490 1490 * @return void 1491 1491 */ 1492 1492 public static function attachFileToObject($file_phid, $object_phid) {
+2 -2
src/applications/harbormaster/storage/HarbormasterBuildable.php
··· 60 60 /** 61 61 * Start builds for a given buildable. 62 62 * 63 - * @param phid $phid PHID of the object to build. 64 - * @param phid $container_phid Container PHID for the buildable. 63 + * @param string $phid PHID of the object to build. 64 + * @param string $container_phid Container PHID for the buildable. 65 65 * @param list<HarbormasterBuildRequest> $requests List of builds to perform. 66 66 * @return void 67 67 */
+6 -6
src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php
··· 199 199 * Each target should be sent a separate email, and contains the information 200 200 * required to generate it with appropriate permissions and configuration. 201 201 * 202 - * @param list<phid> $raw_to List of "To" PHIDs. 203 - * @param list<phid> $raw_cc List of "CC" PHIDs. 202 + * @param list<string> $raw_to List of "To" PHIDs. 203 + * @param list<string> $raw_cc List of "CC" PHIDs. 204 204 * @return list<PhabricatorMailTarget> List of targets. 205 205 */ 206 206 final public function getMailTargets(array $raw_to, array $raw_cc) { ··· 274 274 * This takes any compound recipients (like projects) and looks up all their 275 275 * members. 276 276 * 277 - * @param list<phid> $to List of To PHIDs. 278 - * @param list<phid> $cc List of CC PHIDs. 277 + * @param list<string> $to List of To PHIDs. 278 + * @param list<string> $cc List of CC PHIDs. 279 279 * @return pair<list<phid>, list<phid>> Expanded PHID lists. 280 280 */ 281 281 private function expandRecipientPHIDs(array $to, array $cc) { ··· 332 332 * 333 333 * Invalid recipients are dropped from the results. 334 334 * 335 - * @param list<phid> $to List of To PHIDs. 336 - * @param list<phid> $cc List of CC PHIDs. 335 + * @param list<string> $to List of To PHIDs. 336 + * @param list<string> $cc List of CC PHIDs. 337 337 * @return pair<wild, wild> Maps from PHIDs to users. 338 338 */ 339 339 private function loadRecipientUsers(array $to, array $cc) {
+2 -2
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 859 859 * For example, this will expand project PHIDs into a list of the project's 860 860 * members. 861 861 * 862 - * @param list<phid> $phids List of recipient PHIDs, possibly including 862 + * @param list<string> $phids List of recipient PHIDs, possibly including 863 863 * aggregate recipients. 864 - * @return list<phid> Deaggregated list of mailable recipients. 864 + * @return list<string> Deaggregated list pf PHIDs of mailable recipients. 865 865 */ 866 866 public function expandRecipients(array $phids) { 867 867 if ($this->recipientExpansionMap === null) {
+3 -3
src/applications/people/storage/PhabricatorUser.php
··· 949 949 * Get a @{class:PhabricatorHandleList} which benefits from this viewer's 950 950 * internal handle pool. 951 951 * 952 - * @param list<phid> $phids List of PHIDs to load. 952 + * @param list<string> $phids List of PHIDs to load. 953 953 * @return PhabricatorHandleList Handle list object. 954 954 * @task handle 955 955 */ ··· 968 968 * 969 969 * This benefits from the viewer's internal handle pool. 970 970 * 971 - * @param phid $phid PHID to render a handle for. 971 + * @param string $phid PHID to render a handle for. 972 972 * @return PHUIHandleView View of the handle. 973 973 * @task handle 974 974 */ ··· 982 982 * 983 983 * This benefits from the viewer's internal handle pool. 984 984 * 985 - * @param list<phid> $phids List of PHIDs to render. 985 + * @param list<string> $phids List of PHIDs to render. 986 986 * @return PHUIHandleListView View of the handles. 987 987 * @task handle 988 988 */
+1 -1
src/applications/phid/query/PhabricatorObjectQuery.php
··· 197 197 * a transaction are valid. 198 198 * 199 199 * @param PhabricatorUser $viewer Viewer. 200 - * @param list<phid> $phids List of ostensibly valid PHIDs. 200 + * @param list<string> $phids List of ostensibly valid PHIDs. 201 201 * @return list<phid> List of invalid or restricted PHIDs. 202 202 */ 203 203 public static function loadInvalidPHIDsForViewer(
+2 -2
src/applications/phid/type/PhabricatorPHIDType.php
··· 53 53 * @{method:loadObjects} instead. 54 54 * 55 55 * @param PhabricatorObjectQuery $query Query being executed. 56 - * @param list<phid> $phids PHIDs to load. 56 + * @param list<string> $phids PHIDs to load. 57 57 * @return PhabricatorPolicyAwareQuery Query object which loads the 58 58 * specified PHIDs when executed. 59 59 */ ··· 68 68 * loading to work. 69 69 * 70 70 * @param PhabricatorObjectQuery $query Query being executed. 71 - * @param list<phid> $phids PHIDs to load. 71 + * @param list<string> $phids PHIDs to load. 72 72 * @return list<wild> Corresponding objects. 73 73 */ 74 74 public function loadObjects(
+2 -2
src/applications/phid/utils.php
··· 4 4 * Look up the type of a PHID. Returns 5 5 * PhabricatorPHIDConstants::PHID_TYPE_UNKNOWN if it fails to look up the type 6 6 * 7 - * @param phid $phid Anything. 7 + * @param string $phid A PHID of anything. 8 8 * @return string A value from PhabricatorPHIDConstants (ideally) 9 9 */ 10 10 function phid_get_type($phid) { ··· 18 18 /** 19 19 * Group a list of phids by type. 20 20 * 21 - * @param $phids Array of phids 21 + * @param array $phids Array of PHIDs. 22 22 * @return map of phid type => list of phids 23 23 */ 24 24 function phid_group_by_type($phids) {
+3 -3
src/applications/subscriptions/editor/PhabricatorSubscriptionsEditor.php
··· 18 18 * (or been subscribed) to the object, and will be added even if they 19 19 * had previously unsubscribed. 20 20 * 21 - * @param list<phid> $phids List of PHIDs to explicitly subscribe. 21 + * @param list<string> $phids List of PHIDs to explicitly subscribe. 22 22 * @return $this 23 23 */ 24 24 public function subscribeExplicit(array $phids) { ··· 32 32 * implicitly subscribes them (e.g., adding a comment) but it will be 33 33 * suppressed if they've previously unsubscribed from the object. 34 34 * 35 - * @param list<phid> $phids List of PHIDs to implicitly subscribe. 35 + * @param list<string> $phids List of PHIDs to implicitly subscribe. 36 36 * @return $this 37 37 */ 38 38 public function subscribeImplicit(array $phids) { ··· 45 45 * Unsubscribe PHIDs and mark them as unsubscribed, so implicit subscriptions 46 46 * will not resubscribe them. 47 47 * 48 - * @param list<phid> $phids List of PHIDs to unsubscribe. 48 + * @param list<string> $phids List of PHIDs to unsubscribe. 49 49 * @return $this 50 50 */ 51 51 public function unsubscribe(array $phids) {
+1 -1
src/applications/subscriptions/interface/PhabricatorSubscribableInterface.php
··· 8 8 * irrevocably a subscriber). This will, e.g., cause the UI to render 9 9 * "Automatically Subscribed" instead of "Subscribe". 10 10 * 11 - * @param PHID $phid PHID (presumably a user) to test for automatic 11 + * @param string $phid PHID (presumably a user) to test for automatic 12 12 * subscription. 13 13 * @return bool True if the object/user is automatically subscribed. 14 14 */
+1 -1
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 809 809 /** 810 810 * Load an object by PHID. 811 811 * 812 - * @param phid $phid Object PHID. 812 + * @param string $phid Object PHID. 813 813 * @param list<string> $capabilities (optional) List of required capability 814 814 * constants, or omit for defaults. 815 815 * @return object|null Object, or null if no such object exists.
+1 -1
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 4761 4761 * If the list of PHIDs include mutually exclusive projects, remove the 4762 4762 * conflicting projects. 4763 4763 * 4764 - * @param list<phid> $phids List of project PHIDs. 4764 + * @param list<string> $phids List of project PHIDs. 4765 4765 * @return list<phid> List with conflicts removed. 4766 4766 */ 4767 4767 private function applyProjectConflictRules(array $phids) {
+4 -4
src/infrastructure/edges/editor/PhabricatorEdgeEditor.php
··· 45 45 * - `inverse_data` Optional, data to write on the inverse edge. If not 46 46 * provided, `data` will be written. 47 47 * 48 - * @param phid $src Source object PHID. 48 + * @param string $src Source object PHID. 49 49 * @param string $type Edge type constant. 50 - * @param phid $dst Destination object PHID. 50 + * @param string $dst Destination object PHID. 51 51 * @param map $options (optional) Options map (see documentation). 52 52 * @return $this 53 53 * ··· 67 67 * will be ignored. Edges are added after edges are removed, so the effect of 68 68 * a remove plus an add is to overwrite. 69 69 * 70 - * @param phid $src Source object PHID. 70 + * @param string $src Source object PHID. 71 71 * @param string $type Edge type constant. 72 - * @param phid $dst Destination object PHID. 72 + * @param string $dst Destination object PHID. 73 73 * @return $this 74 74 * 75 75 * @task edit
+3 -3
src/infrastructure/edges/query/PhabricatorEdgeQuery.php
··· 121 121 * edge type. Equivalent to building a full query, but simplifies a common 122 122 * use case. 123 123 * 124 - * @param phid $src_phid Source PHID. 124 + * @param string $src_phid Source PHID. 125 125 * @param string $edge_type Edge type constant. 126 126 * @return list<phid> List of destination PHIDs. 127 127 */ ··· 139 139 * if the edge does not exist or does not have metadata. Builds 140 140 * and immediately executes a full query. 141 141 * 142 - * @param phid $src_phid Source PHID. 142 + * @param string $src_phid Source PHID. 143 143 * @param string $edge_type Edge type constant. 144 - * @param phid $dest_phid Destination PHID. 144 + * @param string $dest_phid Destination PHID. 145 145 * @return wild Edge annotation (or null). 146 146 */ 147 147 public static function loadSingleEdgeData($src_phid, $edge_type, $dest_phid) {
+2 -2
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
··· 2589 2589 * 2590 2590 * @param string $edge_type Edge constant. 2591 2591 * @param string $operator Constraint operator. 2592 - * @param list<phid> $phids List of PHIDs. 2592 + * @param list<string> $phids List of PHIDs. 2593 2593 * @return $this 2594 2594 * @task edgelogic 2595 2595 */ ··· 3095 3095 * Queries are always constrained to include only results from spaces the 3096 3096 * viewer has access to. 3097 3097 * 3098 - * @param list<phid|null> $space_phids 3098 + * @param list<string|null> $space_phids PHIDs of the spaces. 3099 3099 * @task spaces 3100 3100 */ 3101 3101 public function withSpacePHIDs(array $space_phids) {
+2 -2
src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php
··· 506 506 * searches both the current query's workspace and the workspaces of parent 507 507 * queries. 508 508 * 509 - * @param list<phid> $phids List of PHIDs to retrieve. 509 + * @param list<string> $phids List of PHIDs to retrieve. 510 510 * @return $this 511 511 * @task workspace 512 512 */ ··· 536 536 * PHIDs which are "in flight" are actively being queried for. Using this 537 537 * list can prevent infinite query loops by aborting queries which cycle. 538 538 * 539 - * @param list<phid> $phids List of PHIDs which are now in flight. 539 + * @param list<string> $phids List of PHIDs which are now in flight. 540 540 * @return $this 541 541 */ 542 542 public function putPHIDsInFlight(array $phids) {