@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

PhpDoc: Correct some wrong types

Summary:
* Parameter #2 $edge_type of static method PhabricatorEdgeQuery::loadDestinationPHIDs() expects string, int given.
* Parameter #2 $type of method PhabricatorEdgeEditor::addEdge() expects string, int given.
* Parameter #2 $type of method PhabricatorEdgeEditor::removeEdge() expects string, int given.
* Parameter #1 $edge_type of method PhabricatorCursorPagedPolicyAwareQuery<PhabricatorRepository>::withEdgeLogicPHIDs() expects string, int given.
* Parameter #1 $value of method PhabricatorCustomField::newNumericIndex() expects string, int given.

Test Plan: Run static code analysis.

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

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

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

+13 -10
+1 -1
src/infrastructure/customfield/field/PhabricatorCustomField.php
··· 748 748 /** 749 749 * Build and populate storage for a numeric index. 750 750 * 751 - * @param string $value Numeric value to index. 751 + * @param int $value Numeric value to index. 752 752 * @return PhabricatorCustomFieldNumericIndexStorage Populated storage. 753 753 * @task appsearch 754 754 */
+9 -7
src/infrastructure/edges/editor/PhabricatorEdgeEditor.php
··· 46 46 * provided, `data` will be written. 47 47 * 48 48 * @param string $src Source object PHID. 49 - * @param string $type Edge type constant. 49 + * @param int $edge_type Edge type constant 50 + * (SomeClassEdgeType::EDGECONST). 50 51 * @param string $dst Destination object PHID. 51 - * @param map $options (optional) Options map (see documentation). 52 + * @param map $options (optional) Options map (see documentation). 52 53 * @return $this 53 54 * 54 55 * @task edit 55 56 */ 56 - public function addEdge($src, $type, $dst, array $options = array()) { 57 - foreach ($this->buildEdgeSpecs($src, $type, $dst, $options) as $spec) { 57 + public function addEdge($src, $edge_type, $dst, array $options = array()) { 58 + foreach ($this->buildEdgeSpecs($src, $edge_type, $dst, $options) as $spec) { 58 59 $this->addEdges[] = $spec; 59 60 } 60 61 return $this; ··· 68 69 * a remove plus an add is to overwrite. 69 70 * 70 71 * @param string $src Source object PHID. 71 - * @param string $type Edge type constant. 72 + * @param int $edge_type Edge type constant 73 + * (SomeClassEdgeType::EDGECONST). 72 74 * @param string $dst Destination object PHID. 73 75 * @return $this 74 76 * 75 77 * @task edit 76 78 */ 77 - public function removeEdge($src, $type, $dst) { 78 - foreach ($this->buildEdgeSpecs($src, $type, $dst) as $spec) { 79 + public function removeEdge($src, $edge_type, $dst) { 80 + foreach ($this->buildEdgeSpecs($src, $edge_type, $dst) as $spec) { 79 81 $this->remEdges[] = $spec; 80 82 } 81 83 return $this;
+2 -1
src/infrastructure/edges/query/PhabricatorEdgeQuery.php
··· 122 122 * use case. 123 123 * 124 124 * @param string $src_phid Source PHID. 125 - * @param string $edge_type Edge type constant. 125 + * @param int $edge_type Edge type constant 126 + * (SomeClassEdgeType::EDGECONST). 126 127 * @return list<string> List of destination PHIDs. 127 128 */ 128 129 public static function loadDestinationPHIDs($src_phid, $edge_type) {
+1 -1
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
··· 2603 2603 * Convenience method for specifying edge logic constraints with a list of 2604 2604 * PHIDs. 2605 2605 * 2606 - * @param string $edge_type Edge constant. 2606 + * @param int $edge_type Edge type constant (SomeClassEdgeType::EDGECONST). 2607 2607 * @param string $operator Constraint operator. 2608 2608 * @param list<string> $phids List of PHIDs. 2609 2609 * @return $this