@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 return type const with string

Summary:
`const` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html and https://docs.phpdoc.org/guide/references/phpdoc/tags/return.html.
Thus return `string` and get 82 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/D25932

+4 -4
+1 -1
src/applications/auth/engine/PhabricatorAuthSessionEngine.php
··· 76 76 * session token. Returns a `KIND_` constant. 77 77 * 78 78 * @param string $session_token Session token. 79 - * @return const Session kind constant. 79 + * @return string Session kind constant. 80 80 */ 81 81 public static function getSessionKindFromToken($session_token) { 82 82 if (strpos($session_token, '/') === false) {
+1 -1
src/applications/conduit/method/ConduitAPIMethod.php
··· 115 115 * Should return a METHOD_STATUS_* constant. By default, methods are 116 116 * "stable". 117 117 * 118 - * @return const METHOD_STATUS_* constant. 118 + * @return string METHOD_STATUS_* constant. 119 119 * @task status 120 120 */ 121 121 public function getMethodStatus() {
+1 -1
src/applications/policy/constants/PhabricatorPolicies.php
··· 11 11 * Returns the most public policy this install's configuration permits. 12 12 * This is either "public" (if available) or "all users" (if not). 13 13 * 14 - * @return const Most open working policy constant. 14 + * @return string Most open working policy constant. 15 15 */ 16 16 public static function getMostOpenPolicy() { 17 17 if (PhabricatorEnv::getEnvConfig('policy.allow-public')) {
+1 -1
src/applications/settings/panel/PhabricatorSettingsPanel.php
··· 144 144 /** 145 145 * Return a panel group key constant for this panel. 146 146 * 147 - * @return const Panel group key. 147 + * @return string Panel group key. 148 148 * @task config 149 149 */ 150 150 abstract public function getPanelGroupKey();