@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 type pair with array

Summary:
`pair` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html.

Phorge counterpart to D26069.

Test Plan: Read docs; run static code analysis; get 35 errors less.

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

+16 -16
+1 -1
src/aphront/AphrontRequest.php
··· 58 58 * 59 59 * @param string $key URI data key to pull line range information from. 60 60 * @param int|null $limit Maximum length of the range. 61 - * @return null|pair<int, int> Null, or beginning and end of the range. 61 + * @return null|array<int, int> Null, or beginning and end of the range. 62 62 */ 63 63 public function getURILineRange($key, $limit) { 64 64 $range = $this->getURIData($key);
+2 -2
src/aphront/configuration/AphrontApplicationConfiguration.php
··· 387 387 /** 388 388 * Build a controller to respond to the request. 389 389 * 390 - * @return pair<AphrontController,array> Controller and dictionary of request 391 - * parameters. 390 + * @return array<AphrontController,array> Controller and dictionary of 391 + * request parameters. 392 392 * @task routing 393 393 */ 394 394 private function buildController() {
+1 -1
src/aphront/sink/AphrontHTTPSink.php
··· 45 45 /** 46 46 * Write HTTP headers to the output. 47 47 * 48 - * @param list<pair> $headers List of <name, value> pairs. 48 + * @param list<array> $headers List of <name, value> pairs. 49 49 * @return void 50 50 */ 51 51 final public function writeHeaders(array $headers) {
+1 -1
src/applications/celerity/CelerityResourceMapGenerator.php
··· 216 216 * 217 217 * @param string $name Resource name. 218 218 * @param string $data Resource data. 219 - * @return pair<string|null, list<string>|null> The `@provides` symbol and 219 + * @return array<string|null, list<string>|null> The `@provides` symbol and 220 220 * the list of `@requires` symbols. If the resource is not part of the 221 221 * dependency graph, both are null. 222 222 */
+1 -1
src/applications/conduit/controller/PhabricatorConduitAPIController.php
··· 162 162 * @param ConduitAPIRequest $api_request Request being executed. 163 163 * @param array $metadata Dictionary of request metadata. 164 164 * @param wild $method 165 - * @return null|pair Null to indicate successful authentication, or 165 + * @return null|array Null to indicate successful authentication, or 166 166 * an error code and error message pair. 167 167 */ 168 168 private function authenticateUser(
+1 -1
src/applications/differential/render/DifferentialChangesetHTMLRenderer.php
··· 606 606 /** 607 607 * Build the prefixes for line IDs used to track inline comments. 608 608 * 609 - * @return pair<wild, wild> Left and right prefixes. 609 + * @return array<wild, wild> Left and right prefixes. 610 610 */ 611 611 protected function getLineIDPrefixes() { 612 612 // These look like "C123NL45", which means the line is line 45 on the
+3 -3
src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php
··· 276 276 * 277 277 * @param list<string> $to List of To PHIDs. 278 278 * @param list<string> $cc List of CC PHIDs. 279 - * @return pair<list<string>, list<string>> Expanded PHID lists. 279 + * @return array<list<string>, list<string>> Expanded PHID lists. 280 280 */ 281 281 private function expandRecipientPHIDs(array $to, array $cc) { 282 282 $to_result = array(); ··· 334 334 * 335 335 * @param list<string> $to List of To PHIDs. 336 336 * @param list<string> $cc List of CC PHIDs. 337 - * @return pair<wild, wild> Maps from PHIDs to users. 337 + * @return array<wild, wild> Maps from PHIDs to users. 338 338 */ 339 339 private function loadRecipientUsers(array $to, array $cc) { 340 340 $to_result = array(); ··· 372 372 * 373 373 * @param map<string, PhabricatorUser> $to Map of "To" users. 374 374 * @param map<string, PhabricatorUser> $cc Map of "CC" users. 375 - * @return pair<wild, wild> Filtered user maps. 375 + * @return array<wild, wild> Filtered user maps. 376 376 */ 377 377 private function filterRecipientUsers(array $to, array $cc) { 378 378 $to_result = array();
+3 -3
src/applications/phrequent/storage/PhrequentTimeBlock.php
··· 254 254 * This is used to avoid double-counting time on objects which had timers 255 255 * started multiple times. 256 256 * 257 - * @param list<pair<int, int>> $ranges List of possibly overlapping time 258 - * ranges. 259 - * @return list<pair<int, int>> Nonoverlapping time ranges. 257 + * @param list<array<int, int>> $ranges List of possibly overlapping time 258 + * range pairs. 259 + * @return list<array<int, int>> Nonoverlapping time range pairs. 260 260 */ 261 261 public static function mergeTimeRanges(array $ranges) { 262 262 $ranges = isort($ranges, '0');
+1 -1
src/applications/policy/interface/PhabricatorExtendedPolicyInterface.php
··· 64 64 * 65 65 * @param string $capability Constant of the capability being tested. 66 66 * @param PhabricatorUser $viewer Viewer whose capabilities are being tested. 67 - * @return list<pair<wild, wild>> List of extended policies. 67 + * @return list<array<wild, wild>> List of extended policies. 68 68 */ 69 69 public function getExtendedPolicy($capability, PhabricatorUser $viewer); 70 70
+1 -1
src/infrastructure/env/PhabricatorEnv.php
··· 783 783 * 784 784 * @param string $raw_uri URI to test. 785 785 * @param list<string> $protocols Allowed protocols. 786 - * @return pair<string, string> Pre-resolved URI and domain. 786 + * @return array<string, string> Pre-resolved URI and domain. 787 787 * @task uri 788 788 */ 789 789 public static function requireValidRemoteURIForFetch(
+1 -1
src/view/control/AphrontTableView.php
··· 106 106 * list($sort, $reverse) = AphrontTableView::parseSortParam($sort_param); 107 107 * 108 108 * @param string $sort Sort request parameter. 109 - * @return pair Sort value, sort direction. 109 + * @return array Sort value, sort direction. 110 110 */ 111 111 public static function parseSort($sort) { 112 112 return array(ltrim($sort, '-'), preg_match('/^-/', $sort));