1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00

PHPDoc: Replace "@return this" with "@return $this"

Summary:
Per https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md the valid keyword is `$this`.
Thus replace `this` to make output of static code analysis slightly less noisy.

(See rARC4b7ee1985b3c15b4af81b5480522ae24c0afd6a2 for its Arcanist counterpart.)

Test Plan: Read the docs.

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/D25819
This commit is contained in:
Andre Klapper 2024-09-06 19:18:57 +02:00
parent f25c531e56
commit aa2b70708e
52 changed files with 140 additions and 140 deletions

View file

@ -539,7 +539,7 @@ final class AphrontRequest extends Phobject {
*
* @param string $name Cookie name.
* @param string $value Cookie value.
* @return this
* @return $this
* @task cookie
*/
public function setCookie($name, $value) {
@ -555,7 +555,7 @@ final class AphrontRequest extends Phobject {
*
* @param string $name Cookie name.
* @param string $value Cookie value.
* @return this
* @return $this
* @task cookie
*/
public function setTemporaryCookie($name, $value) {
@ -569,7 +569,7 @@ final class AphrontRequest extends Phobject {
* @param string $name Cookie name.
* @param string $value Cookie value.
* @param int $expire Epoch timestamp for cookie expiration.
* @return this
* @return $this
* @task cookie
*/
private function setCookieWithExpiration(

View file

@ -32,7 +32,7 @@ abstract class AphrontHTTPParameterType extends Phobject {
* to use the current viewer to execute queries.
*
* @param PhabricatorUser $viewer Current viewer.
* @return this
* @return $this
* @task read
*/
final public function setViewer(PhabricatorUser $viewer) {

View file

@ -58,7 +58,7 @@ final class AphrontWriteGuard extends Phobject {
* valid token isn't present.
*
* @param $callback Callable CSRF callback.
* @return this
* @return $this
* @task manage
*/
public function __construct($callback) {

View file

@ -13,7 +13,7 @@ class ConduitException extends Exception {
* an exception (e.g., which values were wrong in an invalid request).
*
* @param string $error_description Detailed error description.
* @return this
* @return $this
*/
final public function setErrorDescription($error_description) {
$this->errorDescription = $error_description;

View file

@ -147,7 +147,7 @@ final class PhabricatorSetupIssue extends Phobject {
*
* @param string $php_config PHP configuration option to provide a value for.
* @param string $value Explicit value to show in the UI.
* @return this
* @return $this
*/
public function addPHPConfigOriginalValue($php_config, $value) {
$this->originalPHPConfigValues[$php_config] = $value;

View file

@ -246,7 +246,7 @@ final class DifferentialChangesetParser extends Phobject {
* storage changeset. Note that this may be false, if the left
* side of some storage changeset is being shown as the right
* side of a display diff.
* @return this
* @return $this
*/
public function setRightSideCommentMapping($id, $is_new) {
$this->rightSideChangesetID = $id;
@ -297,7 +297,7 @@ final class DifferentialChangesetParser extends Phobject {
*
* @param string $key Key for identifying this changeset in the render
* cache.
* @return this
* @return $this
*/
public function setRenderCacheKey($key) {
$this->renderCacheKey = $key;

View file

@ -46,7 +46,7 @@ final class DifferentialRevisionQuery
* Find revisions affecting one or more items in a list of paths.
*
* @param list<string> $paths List of file paths.
* @return this
* @return $this
* @task config
*/
public function withPaths(array $paths) {
@ -60,7 +60,7 @@ final class DifferentialRevisionQuery
* @{method:withAuthors}.
*
* @param array $author_phids List of PHIDs of authors
* @return this
* @return $this
* @task config
*/
public function withAuthors(array $author_phids) {
@ -73,7 +73,7 @@ final class DifferentialRevisionQuery
* function will clear anything set by previous calls to @{method:withCCs}.
*
* @param array $cc_phids List of PHIDs of subscribers.
* @return this
* @return $this
* @task config
*/
public function withCCs(array $cc_phids) {
@ -87,7 +87,7 @@ final class DifferentialRevisionQuery
* to @{method:withReviewers}.
*
* @param array $reviewer_phids List of PHIDs of reviewers
* @return this
* @return $this
* @task config
*/
public function withReviewers(array $reviewer_phids) {
@ -127,7 +127,7 @@ final class DifferentialRevisionQuery
* @param array $commit_hashes List of pairs <Class
* ArcanistDifferentialRevisionHash::HASH_$type constant,
* hash>
* @return this
* @return $this
* @task config
*/
public function withCommitHashes(array $commit_hashes) {
@ -150,7 +150,7 @@ final class DifferentialRevisionQuery
* Filter results to revisions on given branches.
*
* @param list $branches List of branch names.
* @return this
* @return $this
* @task config
*/
public function withBranches(array $branches) {
@ -163,7 +163,7 @@ final class DifferentialRevisionQuery
* Filter results to only return revisions whose ids are in the given set.
*
* @param array $ids List of revision ids
* @return this
* @return $this
* @task config
*/
public function withIDs(array $ids) {
@ -176,7 +176,7 @@ final class DifferentialRevisionQuery
* Filter results to only return revisions whose PHIDs are in the given set.
*
* @param array $phids List of revision PHIDs
* @return this
* @return $this
* @task config
*/
public function withPHIDs(array $phids) {
@ -190,7 +190,7 @@ final class DifferentialRevisionQuery
* responsible for (i.e., they are either authors or reviewers).
*
* @param array $responsible_phids List of user PHIDs.
* @return this
* @return $this
* @task config
*/
public function withResponsibleUsers(array $responsible_phids) {
@ -222,7 +222,7 @@ final class DifferentialRevisionQuery
* revision.
*
* @param bool $need_active_diffs True to load and attach diffs.
* @return this
* @return $this
* @task config
*/
public function needActiveDiffs($need_active_diffs) {
@ -236,7 +236,7 @@ final class DifferentialRevisionQuery
* each revision.
*
* @param bool $need_commit_phids True to load and attach diffs.
* @return this
* @return $this
* @task config
*/
public function needCommitPHIDs($need_commit_phids) {
@ -250,7 +250,7 @@ final class DifferentialRevisionQuery
* revision.
*
* @param bool $need_diff_ids True to load and attach diff IDs.
* @return this
* @return $this
* @task config
*/
public function needDiffIDs($need_diff_ids) {
@ -264,7 +264,7 @@ final class DifferentialRevisionQuery
* revision.
*
* @param bool $need_hashes True to load and attach commit hashes.
* @return this
* @return $this
* @task config
*/
public function needHashes($need_hashes) {
@ -277,7 +277,7 @@ final class DifferentialRevisionQuery
* Set whether or not the query should load associated reviewers.
*
* @param bool $need_reviewers True to load and attach reviewers.
* @return this
* @return $this
* @task config
*/
public function needReviewers($need_reviewers) {
@ -292,7 +292,7 @@ final class DifferentialRevisionQuery
* they are a member of.
*
* @param bool $need_reviewer_authority True to load and attach authority.
* @return this
* @return $this
* @task config
*/
public function needReviewerAuthority($need_reviewer_authority) {

View file

@ -296,7 +296,7 @@ abstract class DiffusionRequest extends Phobject {
* Modify the request to move the symbolic commit elsewhere.
*
* @param string $symbol New symbolic commit.
* @return this
* @return $this
*/
public function updateSymbolicCommit($symbol) {
$this->symbolicCommit = $symbol;

View file

@ -94,7 +94,7 @@ final class DivinerAtomQuery extends PhabricatorCursorPagedPolicyAwareQuery {
* restore the original data.
*
* @param bool $ghosts
* @return this
* @return $this
*/
public function withGhosts($ghosts) {
$this->isGhost = $ghosts;

View file

@ -33,7 +33,7 @@ abstract class DoorkeeperFeedStoryPublisher extends Phobject {
*
* @param bool $render_with_implied_context True to assume object context
* when rendering.
* @return this
* @return $this
* @task config
*/
public function setRenderWithImpliedContext($render_with_implied_context) {

View file

@ -511,7 +511,7 @@ final class DrydockLease extends DrydockDAO
/**
* Awaken yielded tasks after a state change.
*
* @return this
* @return $this
*/
public function awakenTasks() {
$awaken_ids = $this->getAttribute('internal.awakenTaskIDs');

View file

@ -98,7 +98,7 @@ final class PhabricatorFileQuery
*
* @param list<dict> $specs List of transform specifications, described
* above.
* @return this
* @return $this
*/
public function withTransforms(array $specs) {
foreach ($specs as $spec) {

View file

@ -1472,7 +1472,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
* This method is successful even if the file is already attached.
*
* @param phid $phid Object PHID to attach to.
* @return this
* @return $this
*/
public function attachToObject($phid) {
self::attachFileToObject($this->getPHID(), $phid);
@ -1526,7 +1526,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
*
* @param map<string, wild> $params Bag of parameters, see
* @{class:PhabricatorFile} for documentation.
* @return this
* @return $this
*/
private function readPropertiesFromParameters(array $params) {
PhutilTypeSpec::checkMap(

View file

@ -173,7 +173,7 @@ abstract class HeraldAdapter extends Phobject {
*
* @param list<PhabricatorApplicationTransaction> $xactions List of
* transactions.
* @return this
* @return $this
*/
final public function setAppliedTransactions(array $xactions) {
assert_instances_of($xactions, 'PhabricatorApplicationTransaction');

View file

@ -89,7 +89,7 @@ final class PhabricatorMetaMTAMail
* of mail, like updates when a task's projects change.
*
* @param list<const> $tags
* @return this
* @return $this
*/
public function setMailTags(array $tags) {
$this->setParam('mailtags', array_unique($tags));
@ -110,7 +110,7 @@ final class PhabricatorMetaMTAMail
* T251 for more details.
*
* @param string $id The "Message-ID" of the email which precedes this one.
* @return this
* @return $this
*/
public function setParentMessageID($id) {
$this->setParam('parent-message-id', $id);
@ -420,7 +420,7 @@ final class PhabricatorMetaMTAMail
* receive things like password resets.
*
* @param bool $force True to force delivery despite user preferences.
* @return this
* @return $this
*/
public function setForceDelivery($force) {
$this->setParam('force', $force);
@ -438,7 +438,7 @@ final class PhabricatorMetaMTAMail
* dependent.
*
* @param bool $is_bulk True if the mail is automated bulk mail.
* @return this
* @return $this
*/
public function setIsBulk($is_bulk) {
$this->setParam('is-bulk', $is_bulk);
@ -458,7 +458,7 @@ final class PhabricatorMetaMTAMail
* Message-ID, In-Reply-To or References headers.
* @param bool $is_first_message (optional) If true, indicates this is the
* first message in the thread.
* @return this
* @return $this
*/
public function setThreadID($thread_id, $is_first_message = false) {
$this->setParam('thread-id', $thread_id);
@ -478,14 +478,14 @@ final class PhabricatorMetaMTAMail
* Save a newly created mail to the database. The mail will eventually be
* delivered by the MetaMTA daemon.
*
* @return this
* @return $this
*/
public function saveAndSend() {
return $this->save();
}
/**
* @return this
* @return $this
*/
public function save() {
if ($this->getID()) {

View file

@ -41,7 +41,7 @@ final class PhabricatorMetaMTAMailBody extends Phobject {
* Add a raw block of text to the email. This will be rendered as-is.
*
* @param string $text Block of text.
* @return this
* @return $this
* @task compose
*/
public function addRawSection($text) {
@ -102,7 +102,7 @@ final class PhabricatorMetaMTAMailBody extends Phobject {
*
* @param string $header Header text.
* @param string $section Section text.
* @return this
* @return $this
* @task compose
*/
public function addTextSection($header, $section) {
@ -156,7 +156,7 @@ final class PhabricatorMetaMTAMailBody extends Phobject {
* Add an attachment.
*
* @param PhabricatorMailAttachment $attachment Attachment.
* @return this
* @return $this
* @task compose
*/
public function addAttachment(PhabricatorMailAttachment $attachment) {

View file

@ -33,7 +33,7 @@ final class PhabricatorNotificationQuery
*
* @param mixed $unread True or false to filter results by read status. Null
* to remove the filter.
* @return this
* @return $this
* @task config
*/
public function withUnread($unread) {

View file

@ -478,7 +478,7 @@ final class PhabricatorUser
* This is primarily useful for unit tests.
*
* @param string $identifier New timezone identifier.
* @return this
* @return $this
* @task settings
*/
public function overrideTimezoneIdentifier($identifier) {
@ -772,7 +772,7 @@ final class PhabricatorUser
*
* @param wild $availability Availability cache data.
* @param int|null $ttl Cache TTL.
* @return this
* @return $this
* @task availability
*/
public function writeAvailabilityCache(array $availability, $ttl) {

View file

@ -181,7 +181,7 @@ final class PhabricatorUserEmail
* Send a verification email from $user to this address.
*
* @param PhabricatorUser $user The user sending the verification.
* @return this
* @return $this
* @task email
*/
public function sendVerificationEmail(PhabricatorUser $user) {
@ -270,7 +270,7 @@ final class PhabricatorUserEmail
* recipient that this is now their account's new primary email address.
*
* @param PhabricatorUser $user The user sending the verification.
* @return this
* @return $this
* @task email
*/
public function sendNewPrimaryEmail(PhabricatorUser $user) {

View file

@ -276,7 +276,7 @@ final class PhabricatorObjectHandle
* @{method:isComplete} for an explanation of what it means to be complete.
*
* @param bool $complete True if the handle represents a complete object.
* @return this
* @return $this
*/
public function setComplete($complete) {
$this->complete = $complete;

View file

@ -197,7 +197,7 @@ final class PhortuneCurrency extends Phobject {
*
* @param string|null Currency string, or null to skip check.
* @param string|null Currency string, or null to skip check.
* @return this
* @return $this
*/
public function assertInRange($minimum, $maximum) {
if ($minimum !== null && $maximum !== null) {

View file

@ -48,7 +48,7 @@ final class PhortuneCartQuery
* Include or exclude carts which represent invoices with payments due.
*
* @param bool `true` to select invoices; `false` to exclude invoices.
* @return this
* @return $this
*/
public function withInvoices($invoices) {
$this->invoices = $invoices;

View file

@ -34,7 +34,7 @@ abstract class PhabricatorSearchField extends Phobject {
* does not contain any special characters.
*
* @param string $key Unique key which identifies the field.
* @return this
* @return $this
* @task config
*/
public function setKey($key) {
@ -60,7 +60,7 @@ abstract class PhabricatorSearchField extends Phobject {
* This should be a short text string, like "Reviewers" or "Colors".
*
* @param string $label Short, human-readable field label.
* @return this
* @return $this
* task config
*/
public function setLabel($label) {
@ -87,7 +87,7 @@ abstract class PhabricatorSearchField extends Phobject {
* behalf by the caller.
*
* @param PhabricatorUser $viewer Viewer.
* @return this
* @return $this
* @task config
*/
public function setViewer(PhabricatorUser $viewer) {
@ -116,7 +116,7 @@ abstract class PhabricatorSearchField extends Phobject {
* `&authorPHIDs=alincoln`. This is a little easier to use.
*
* @param list<string> $aliases List of aliases for this field.
* @return this
* @return $this
* @task config
*/
public function setAliases(array $aliases) {
@ -143,7 +143,7 @@ abstract class PhabricatorSearchField extends Phobject {
* If no key is provided, the main key is used.
*
* @param string $conduit_key Alternate key for Conduit.
* @return this
* @return $this
* @task config
*/
public function setConduitKey($conduit_key) {
@ -171,7 +171,7 @@ abstract class PhabricatorSearchField extends Phobject {
* Set a human-readable description for this field.
*
* @param string $description Human-readable description.
* @return this
* @return $this
* @task config
*/
public function setDescription($description) {
@ -195,7 +195,7 @@ abstract class PhabricatorSearchField extends Phobject {
* Hide this field from the web UI.
*
* @param bool $is_hidden True to hide the field from the web UI.
* @return this
* @return $this
* @task config
*/
public function setIsHidden($is_hidden) {

View file

@ -19,7 +19,7 @@ final class PhabricatorSubscriptionsEditor extends PhabricatorEditor {
* had previously unsubscribed.
*
* @param list<phid> $phids List of PHIDs to explicitly subscribe.
* @return this
* @return $this
*/
public function subscribeExplicit(array $phids) {
$this->explicitSubscribePHIDs += array_fill_keys($phids, true);
@ -33,7 +33,7 @@ final class PhabricatorSubscriptionsEditor extends PhabricatorEditor {
* suppressed if they've previously unsubscribed from the object.
*
* @param list<phid> $phids List of PHIDs to implicitly subscribe.
* @return this
* @return $this
*/
public function subscribeImplicit(array $phids) {
$this->implicitSubscribePHIDs += array_fill_keys($phids, true);
@ -46,7 +46,7 @@ final class PhabricatorSubscriptionsEditor extends PhabricatorEditor {
* will not resubscribe them.
*
* @param list<phid> $phids List of PHIDs to unsubscribe.
* @return this
* @return $this
*/
public function unsubscribe(array $phids) {
$this->unsubscribePHIDs += array_fill_keys($phids, true);

View file

@ -699,7 +699,7 @@ abstract class PhabricatorEditEngine
* Flag this workflow as a create or edit.
*
* @param bool $is_create True if this is a create workflow.
* @return this
* @return $this
* @task load
*/
private function setIsCreate($is_create) {

View file

@ -142,7 +142,7 @@ abstract class PhabricatorApplicationTransactionEditor
*
* @param bool $continue True to drop transactions without effect and
* continue.
* @return this
* @return $this
*/
public function setContinueOnNoEffect($continue) {
$this->continueOnNoEffect = $continue;
@ -171,7 +171,7 @@ abstract class PhabricatorApplicationTransactionEditor
*
* @param bool $continue_on_missing_fields True to continue when transactions
* don't completely satisfy all required fields.
* @return this
* @return $this
*/
public function setContinueOnMissingFields($continue_on_missing_fields) {
$this->continueOnMissingFields = $continue_on_missing_fields;
@ -4603,7 +4603,7 @@ abstract class PhabricatorApplicationTransactionEditor
*
* @param dict<string, wild> $state Editor state, from
@{method:getWorkerState}.
* @return this
* @return $this
* @task workers
*/
final public function loadWorkerState(array $state) {
@ -4630,7 +4630,7 @@ abstract class PhabricatorApplicationTransactionEditor
*
* @param dict<string, wild> $state Custom state,
* from @{method:getCustomWorkerState}.
* @return this
* @return $this
* @task workers
*/
protected function loadCustomWorkerState(array $state) {

View file

@ -27,7 +27,7 @@ final class PhutilInRequestKeyValueCache extends PhutilKeyValueCache {
* cache. Setting a limit of `0` disables the cache.
*
* @param int $limit Maximum number of items to store in the cache.
* @return this
* @return $this
*/
public function setLimit($limit) {
$this->limit = $limit;

View file

@ -52,7 +52,7 @@ abstract class PhutilKeyValueCache extends Phobject {
* @param string $key Key to set.
* @param wild $value Value to set.
* @param int|null $ttl (optional) TTL.
* @return this
* @return $this
* @task kvimpl
*/
final public function setKey($key, $value, $ttl = null) {
@ -65,7 +65,7 @@ abstract class PhutilKeyValueCache extends Phobject {
* keys at once.
*
* @param string $key Key to delete.
* @return this
* @return $this
* @task kvimpl
*/
final public function deleteKey($key) {
@ -94,7 +94,7 @@ abstract class PhutilKeyValueCache extends Phobject {
*
* @param dict<string, wild> $keys Map of cache keys to values.
* @param int|null $ttl (optional) TTL for cache keys, in seconds.
* @return this
* @return $this
* @task kvimpl
*/
abstract public function setKeys(array $keys, $ttl = null);
@ -104,7 +104,7 @@ abstract class PhutilKeyValueCache extends Phobject {
* Delete a list of keys from the cache.
*
* @param list<string> $keys List of keys to delete.
* @return this
* @return $this
* @task kvimpl
*/
abstract public function deleteKeys(array $keys);
@ -113,7 +113,7 @@ abstract class PhutilKeyValueCache extends Phobject {
/**
* Completely destroy all data in the cache.
*
* @return this
* @return $this
* @task kvimpl
*/
abstract public function destroyCache();

View file

@ -18,7 +18,7 @@ final class PhutilKeyValueCacheProfiler extends PhutilKeyValueCacheProxy {
* Set a profiler for cache operations.
*
* @param PhutilServiceProfiler $profiler Service profiler.
* @return this
* @return $this
* @task kvimpl
*/
public function setProfiler(PhutilServiceProfiler $profiler) {

View file

@ -40,7 +40,7 @@ final class PhutilKeyValueCacheStack extends PhutilKeyValueCache {
*
* @param list<PhutilKeyValueCache> $caches Ordered list of key-value
* caches.
* @return this
* @return $this
* @task config
*/
public function setCaches(array $caches) {
@ -64,7 +64,7 @@ final class PhutilKeyValueCacheStack extends PhutilKeyValueCache {
* $stack->getKey('hedgehog');
*
* @param int $ttl TTL in seconds.
* @return this
* @return $this
*
* @task config
*/

View file

@ -101,7 +101,7 @@ final class PhutilMemcacheKeyValueCache extends PhutilKeyValueCache {
* ));
*
* @param list<dict> $servers List of server specifications.
* @return this
* @return $this
* @task memcache
*/
public function setServers(array $servers) {

View file

@ -383,7 +383,7 @@ abstract class PhabricatorCustomField extends Phobject {
* discussion of field proxies.
*
* @param PhabricatorCustomField $proxy Field implementation.
* @return this
* @return $this
* @task proxy
*/
final public function setProxy(PhabricatorCustomField $proxy) {
@ -423,7 +423,7 @@ abstract class PhabricatorCustomField extends Phobject {
*
* @param PhabricatorCustomFieldInterface $object The object this field
* belongs to.
* @return this
* @return $this
* @task context
*/
final public function setObject(PhabricatorCustomFieldInterface $object) {
@ -443,7 +443,7 @@ abstract class PhabricatorCustomField extends Phobject {
*
* @param PhabricatorCustomFieldInterface $object The object this field
* belongs to.
* @return this
* @return $this
* @task context
*/
public function readValueFromObject(PhabricatorCustomFieldInterface $object) {
@ -612,7 +612,7 @@ abstract class PhabricatorCustomField extends Phobject {
* @param string|null $value Serialized field representation (from
* @{method:getValueForStorage}) or null if no value has
* ever been stored.
* @return this
* @return $this
* @task storage
*/
public function setValueFromStorage($value) {

View file

@ -344,7 +344,7 @@ abstract class PhutilDaemon extends Phobject {
* that are part of an autoscale pool are continuously busy for a prolonged
* period of time, the overseer may scale up the pool.
*
* @return this
* @return $this
* @task autoscale
*/
protected function willBeginWork() {
@ -365,7 +365,7 @@ abstract class PhutilDaemon extends Phobject {
* that are part of an autoscale pool are idle for a prolonged period of
* time, they may exit to scale the pool down.
*
* @return this
* @return $this
* @task autoscale
*/
protected function willBeginIdle() {

View file

@ -233,7 +233,7 @@ abstract class PhabricatorWorker extends Phobject {
* @param string $class Task class to queue.
* @param array $data Data for the followup task.
* @param array $options (optional) Options for the followup task.
* @return this
* @return $this
*/
final protected function queueTask(
$class,

View file

@ -60,7 +60,7 @@ final class PhabricatorWorkerLeaseQuery extends PhabricatorQuery {
*
* @param mixed $leased `true` to select only leased tasks, `false` to select
* only unleased tasks (default), or `null` to select both.
* @return this
* @return $this
*/
public function withLeasedTasks($leased) {
$this->leased = $leased;

View file

@ -60,7 +60,7 @@ final class PhabricatorWorkerTriggerQuery
* ordering when querying for specific triggers, e.g. by ID or PHID.
*
* @param const $order Result order.
* @return this
* @return $this
*/
public function setOrder($order) {
$this->order = $order;

View file

@ -22,7 +22,7 @@ final class PhabricatorDifferenceEngine extends Phobject {
* Set the name to identify the old file with. Primarily cosmetic.
*
* @param string $old_name Old file name.
* @return this
* @return $this
* @task config
*/
public function setOldName($old_name) {
@ -35,7 +35,7 @@ final class PhabricatorDifferenceEngine extends Phobject {
* Set the name to identify the new file with. Primarily cosmetic.
*
* @param string $new_name New file name.
* @return this
* @return $this
* @task config
*/
public function setNewName($new_name) {

View file

@ -49,7 +49,7 @@ final class PhabricatorEdgeEditor extends Phobject {
* @param const $type Edge type constant.
* @param phid $dst Destination object PHID.
* @param map $options (optional) Options map (see documentation).
* @return this
* @return $this
*
* @task edit
*/
@ -70,7 +70,7 @@ final class PhabricatorEdgeEditor extends Phobject {
* @param phid $src Source object PHID.
* @param const $type Edge type constant.
* @param phid $dst Destination object PHID.
* @return this
* @return $this
*
* @task edit
*/

View file

@ -41,7 +41,7 @@ final class PhabricatorEdgeQuery extends PhabricatorQuery {
* to execute an edge query.
*
* @param list $source_phids List of source PHIDs.
* @return this
* @return $this
*
* @task config
*/
@ -62,7 +62,7 @@ final class PhabricatorEdgeQuery extends PhabricatorQuery {
* Find edges terminating at one or more destination PHIDs.
*
* @param list $dest_phids List of destination PHIDs.
* @return this
* @return $this
*
*/
public function withDestinationPHIDs(array $dest_phids) {
@ -75,7 +75,7 @@ final class PhabricatorEdgeQuery extends PhabricatorQuery {
* Find edges of specific types.
*
* @param list $types List of PhabricatorEdgeConfig type constants.
* @return this
* @return $this
*
* @task config
*/
@ -89,7 +89,7 @@ final class PhabricatorEdgeQuery extends PhabricatorQuery {
* Configure the order edge results are returned in.
*
* @param const $order Order constant.
* @return this
* @return $this
*
* @task config
*/
@ -103,7 +103,7 @@ final class PhabricatorEdgeQuery extends PhabricatorQuery {
* When loading edges, also load edge data.
*
* @param bool $need True to load edge data.
* @return this
* @return $this
*
* @task config
*/

View file

@ -19,7 +19,7 @@ final class PhabricatorScopedEnv extends Phobject {
*
* @param string $key Key to override.
* @param wild $value New value.
* @return this
* @return $this
*
* @task override
*/

View file

@ -84,7 +84,7 @@ final class PhabricatorMarkupEngine extends Phobject {
*
* @param PhabricatorMarkupInterface $object The object to render.
* @param string $field The field to render.
* @return this
* @return $this
* @task markup
*/
public function addObject(PhabricatorMarkupInterface $object, $field) {
@ -102,7 +102,7 @@ final class PhabricatorMarkupEngine extends Phobject {
* Process objects queued with @{method:addObject}. You can then retrieve
* the output with @{method:getOutput}.
*
* @return this
* @return $this
* @task markup
*/
public function process() {
@ -319,7 +319,7 @@ final class PhabricatorMarkupEngine extends Phobject {
* Set the viewing user. Used to implement object permissions.
*
* @param PhabricatorUser $viewer The viewing user.
* @return this
* @return $this
* @task markup
*/
public function setViewer(PhabricatorUser $viewer) {
@ -331,7 +331,7 @@ final class PhabricatorMarkupEngine extends Phobject {
* Set the context object. Used to implement object permissions.
*
* @param $object The object in which context this remarkup is used.
* @return this
* @return $this
* @task markup
*/
public function setContextObject($object) {

View file

@ -10,7 +10,7 @@ abstract class PhutilMarkupEngine extends Phobject {
*
* @param string $key Key to set in the configuration dictionary.
* @param string $value Value to set.
* @return this
* @return $this
*/
abstract public function setConfig($key, $value);

View file

@ -885,7 +885,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
* also more involved.
*
* @param string $order Key of a builtin order supported by this query.
* @return this
* @return $this
* @task order
*/
public function setOrder($order) {
@ -919,7 +919,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
*
* @param PhabricatorQueryOrderVector|list<string> $vector List of order
* keys.
* @return this
* @return $this
* @task order
*/
public function setGroupVector($vector) {
@ -1044,7 +1044,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
*
* @param PhabricatorQueryOrderVector|list<string> $vector List of order
* keys.
* @return this
* @return $this
* @task order
*/
public function setOrderVector($vector) {
@ -1358,7 +1358,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
* @param PhabricatorCustomFieldIndexStorage $index Table where the index is
* stored.
* @param string|list<string> $value One or more values to filter by.
* @return this
* @return $this
* @task appsearch
*/
public function withApplicationSearchContainsConstraint(
@ -1410,7 +1410,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
* stored.
* @param int|null $min Minimum permissible value, inclusive.
* @param int|null $max Maximum permissible value, inclusive.
* @return this
* @return $this
* @task appsearch
*/
public function withApplicationSearchRangeConstraint(
@ -2590,7 +2590,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
* @param const $edge_type Edge constant.
* @param const $operator Constraint operator.
* @param list<phid> $phids List of PHIDs.
* @return this
* @return $this
* @task edgelogic
*/
public function withEdgeLogicPHIDs($edge_type, $operator, array $phids) {
@ -2604,7 +2604,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
/**
* @return this
* @return $this
* @task edgelogic
*/
public function withEdgeLogicConstraints($edge_type, array $constraints) {
@ -3001,7 +3001,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
/**
* Validate edge logic constraints for the query.
*
* @return this
* @return $this
* @task edgelogic
*/
private function validateEdgeLogicConstraints() {

View file

@ -58,7 +58,7 @@ abstract class PhabricatorPolicyAwareQuery extends PhabricatorOffsetPagedQuery {
* a policy query.
*
* @param PhabricatorUser $viewer The viewing user.
* @return this
* @return $this
* @task config
*/
final public function setViewer(PhabricatorUser $viewer) {
@ -83,7 +83,7 @@ abstract class PhabricatorPolicyAwareQuery extends PhabricatorOffsetPagedQuery {
* that configuration like whether or not to raise policy exceptions is
* seamlessly passed along to child queries.
*
* @return this
* @return $this
* @task config
*/
final public function setParentQuery(PhabricatorPolicyAwareQuery $query) {
@ -106,7 +106,7 @@ abstract class PhabricatorPolicyAwareQuery extends PhabricatorOffsetPagedQuery {
/**
* Hook to configure whether this query should raise policy exceptions.
*
* @return this
* @return $this
* @task config
*/
final public function setRaisePolicyExceptions($bool) {
@ -475,7 +475,7 @@ abstract class PhabricatorPolicyAwareQuery extends PhabricatorOffsetPagedQuery {
*
* @param map<phid, PhabricatorPolicyInterface> $objects Objects to add to
* the query workspace.
* @return this
* @return $this
* @task workspace
*/
public function putObjectsInWorkspace(array $objects) {
@ -507,7 +507,7 @@ abstract class PhabricatorPolicyAwareQuery extends PhabricatorOffsetPagedQuery {
* queries.
*
* @param list<phid> $phids List of PHIDs to retrieve.
* @return this
* @return $this
* @task workspace
*/
public function getObjectsFromWorkspace(array $phids) {
@ -537,7 +537,7 @@ abstract class PhabricatorPolicyAwareQuery extends PhabricatorOffsetPagedQuery {
* list can prevent infinite query loops by aborting queries which cycle.
*
* @param list<phid> $phids List of PHIDs which are now in flight.
* @return this
* @return $this
*/
public function putPHIDsInFlight(array $phids) {
foreach ($phids as $phid) {

View file

@ -164,7 +164,7 @@ abstract class AphrontDatabaseConnection
* Begin a transaction, or set a savepoint if the connection is already
* transactional.
*
* @return this
* @return $this
* @task xaction
*/
public function openTransaction() {
@ -189,7 +189,7 @@ abstract class AphrontDatabaseConnection
* Commit a transaction, or stage a savepoint for commit once the entire
* transaction completes if inside a transaction stack.
*
* @return this
* @return $this
* @task xaction
*/
public function saveTransaction() {
@ -208,7 +208,7 @@ abstract class AphrontDatabaseConnection
* Rollback a transaction, or unstage the last savepoint if inside a
* transaction stack.
*
* @return this
* @return $this
*/
public function killTransaction() {
$state = $this->getTransactionState();

View file

@ -265,7 +265,7 @@ abstract class LiskDAO extends Phobject
* @param mode $mode Connection mode.
* @param AphrontDatabaseConnection $connection Connection to cache.
* @param bool $force_unique (optional)
* @return this
* @return $this
* @task conn
*/
protected function setEstablishedConnection(
@ -548,7 +548,7 @@ abstract class LiskDAO extends Phobject
* properties. This is primarily useful after entering a transaction but
* before applying changes to an object.
*
* @return this
* @return $this
*
* @task load
*/
@ -580,7 +580,7 @@ abstract class LiskDAO extends Phobject
* @param dict $row Dictionary of properties, which should be equivalent
* to selecting a row from the table or calling
* @{method:getProperties}.
* @return this
* @return $this
*
* @task load
*/
@ -694,7 +694,7 @@ abstract class LiskDAO extends Phobject
* method unless with `IDS_MANUAL`.
*
* @param mixed $id Unique ID.
* @return this
* @return $this
* @task save
*/
public function setID($id) {
@ -918,7 +918,7 @@ abstract class LiskDAO extends Phobject
* method you need to call to do writes. If the object has not yet been
* inserted this will do an insert; if it has, it will do an update.
*
* @return this
* @return $this
*
* @task save
*/
@ -935,7 +935,7 @@ abstract class LiskDAO extends Phobject
* Save this object, forcing the query to use REPLACE regardless of object
* state.
*
* @return this
* @return $this
*
* @task save
*/
@ -949,7 +949,7 @@ abstract class LiskDAO extends Phobject
* Save this object, forcing the query to use INSERT regardless of object
* state.
*
* @return this
* @return $this
*
* @task save
*/
@ -963,7 +963,7 @@ abstract class LiskDAO extends Phobject
* Save this object, forcing the query to use UPDATE regardless of object
* state.
*
* @return this
* @return $this
*
* @task save
*/
@ -1019,7 +1019,7 @@ abstract class LiskDAO extends Phobject
/**
* Delete this object, permanently.
*
* @return this
* @return $this
*
* @task save
*/
@ -1044,7 +1044,7 @@ abstract class LiskDAO extends Phobject
*
* @param const $mode Either "INSERT" or "REPLACE", to force the desired
* mode.
* @return this
* @return $this
*
* @task save
*/
@ -1309,7 +1309,7 @@ abstract class LiskDAO extends Phobject
/**
* Increase transaction stack depth.
*
* @return this
* @return $this
*/
public function openTransaction() {
$this->establishConnection('w')->openTransaction();
@ -1320,7 +1320,7 @@ abstract class LiskDAO extends Phobject
/**
* Decrease transaction stack depth, saving work.
*
* @return this
* @return $this
*/
public function saveTransaction() {
$this->establishConnection('w')->saveTransaction();
@ -1331,7 +1331,7 @@ abstract class LiskDAO extends Phobject
/**
* Decrease transaction stack depth, discarding work.
*
* @return this
* @return $this
*/
public function killTransaction() {
$this->establishConnection('w')->killTransaction();
@ -1355,7 +1355,7 @@ abstract class LiskDAO extends Phobject
* $beach->endReadLocking();
* $beach->saveTransaction();
*
* @return this
* @return $this
* @task xaction
*/
public function beginReadLocking() {
@ -1367,7 +1367,7 @@ abstract class LiskDAO extends Phobject
/**
* Ends read-locking that began at an earlier @{method:beginReadLocking} call.
*
* @return this
* @return $this
* @task xaction
*/
public function endReadLocking() {
@ -1382,7 +1382,7 @@ abstract class LiskDAO extends Phobject
* MySQL documentation for details). To end write locking, call
* @{method:endWriteLocking}.
*
* @return this
* @return $this
* @task xaction
*/
public function beginWriteLocking() {
@ -1395,7 +1395,7 @@ abstract class LiskDAO extends Phobject
* Ends write-locking that began at an earlier @{method:beginWriteLocking}
* call.
*
* @return this
* @return $this
* @task xaction
*/
public function endWriteLocking() {

View file

@ -89,7 +89,7 @@ final class PhabricatorGlobalLock extends PhutilLock {
* be used to lock on a specific connection.
*
* @param AphrontDatabaseConnection $conn
* @return this
* @return $this
*/
public function setExternalConnection(AphrontDatabaseConnection $conn) {
if ($this->conn) {

View file

@ -17,7 +17,7 @@ abstract class AphrontView extends Phobject
* Set the user viewing this element.
*
* @param PhabricatorUser $viewer Viewing user.
* @return this
* @return $this
*/
public function setViewer(PhabricatorUser $viewer) {
$this->viewer = $viewer;
@ -101,7 +101,7 @@ abstract class AphrontView extends Phobject
* determined by @{method:canAppendChild}.
*
* @param wild $child Something renderable.
* @return this
* @return $this
*/
final public function appendChild($child) {
if (!$this->canAppendChild()) {

View file

@ -121,7 +121,7 @@ final class AphrontFormView extends AphrontView {
* control to simplify rendering.
*
* @param AphrontFormControl $control Control to append.
* @return this
* @return $this
*/
public function appendControl(AphrontFormControl $control) {
$this->controls[] = $control;

View file

@ -24,7 +24,7 @@ final class PHUICrumbView extends AphrontView {
* be hidden.
*
* @param bool $always_visible True to make the crumb always visible.
* @return this
* @return $this
*/
public function setAlwaysVisible($always_visible) {
$this->alwaysVisible = $always_visible;

View file

@ -17,7 +17,7 @@ final class PHUICrumbsView extends AphrontView {
*
* @param string $text Text of the crumb.
* @param string $href (optional) href for the crumb.
* @return this
* @return $this
*/
public function addTextCrumb($text, $href = null) {
return $this->addCrumb(

View file

@ -184,7 +184,7 @@ abstract class PhabricatorClientLimit {
*
* @param float $score The cost for this request; more points pushes them
* toward the limit faster.
* @return this
* @return $this
*/
private function addScore($score) {
$is_apcu = (bool)function_exists('apcu_fetch');