From 4b7ee1985b3c15b4af81b5480522ae24c0afd6a2 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Thu, 5 Sep 2024 17:21:07 +0200 Subject: [PATCH] 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. 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/D25818 --- src/channel/PhutilChannel.php | 6 +++--- src/channel/PhutilExecChannel.php | 2 +- src/channel/PhutilProtocolChannel.php | 4 ++-- src/console/view/PhutilConsoleView.php | 2 +- src/filesystem/FileFinder.php | 2 +- src/filesystem/FileList.php | 2 +- src/filesystem/PhutilDeferredLog.php | 6 +++--- src/filesystem/PhutilLock.php | 4 ++-- src/filesystem/TempFile.php | 2 +- src/filesystem/linesofalarge/LinesOfALarge.php | 2 +- src/future/FutureIterator.php | 4 ++-- src/future/exec/ExecFuture.php | 12 ++++++------ src/future/exec/PhutilExecutableFuture.php | 6 +++--- src/future/http/BaseHTTPFuture.php | 14 +++++++------- src/future/http/HTTPSFuture.php | 12 ++++++------ src/hgdaemon/ArcanistHgProxyClient.php | 2 +- src/hgdaemon/ArcanistHgProxyServer.php | 10 +++++----- src/lint/engine/ArcanistLintEngine.php | 4 ++-- src/lint/linter/ArcanistExternalLinter.php | 8 ++++---- src/lint/linter/ArcanistLinter.php | 2 +- src/lint/linter/ArcanistXHPASTLinter.php | 2 +- .../linter/xhpast/ArcanistXHPASTLintNamingHook.php | 2 +- src/moduleutils/PhutilLibraryMapBuilder.php | 2 +- src/parser/PhutilSimpleOptions.php | 2 +- src/parser/argument/PhutilArgumentParser.php | 12 ++++++------ src/repository/api/ArcanistRepositoryAPI.php | 2 +- src/symbols/PhutilClassMapQuery.php | 10 +++++----- src/symbols/PhutilSymbolLoader.php | 12 ++++++------ src/unit/ArcanistUnitTestResult.php | 2 +- src/upload/ArcanistFileDataRef.php | 6 +++--- src/upload/ArcanistFileUploader.php | 2 +- src/utils/AbstractDirectedGraph.php | 4 ++-- src/utils/PhutilBufferedIterator.php | 2 +- src/utils/PhutilRope.php | 4 ++-- src/workflow/ArcanistWorkflow.php | 8 ++++---- 35 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/channel/PhutilChannel.php b/src/channel/PhutilChannel.php index 2827de10..5ea98887 100644 --- a/src/channel/PhutilChannel.php +++ b/src/channel/PhutilChannel.php @@ -66,7 +66,7 @@ abstract class PhutilChannel extends Phobject { * The default implementation accepts bytes. * * @param wild $bytes Data to write to the channel, normally bytes. - * @return this + * @return $this * * @task io */ @@ -247,7 +247,7 @@ abstract class PhutilChannel extends Phobject { * channel code more easily, by naming channels something meaningful. * * @param string $name Channel name. - * @return this + * @return $this * * @task impl */ @@ -364,7 +364,7 @@ abstract class PhutilChannel extends Phobject { * * @param int|null $size Maximum read buffer size, or `null` for a limitless * buffer. - * @return this + * @return $this * @task impl */ public function setReadBufferSize($size) { diff --git a/src/channel/PhutilExecChannel.php b/src/channel/PhutilExecChannel.php index 0f862103..8e736178 100644 --- a/src/channel/PhutilExecChannel.php +++ b/src/channel/PhutilExecChannel.php @@ -163,7 +163,7 @@ final class PhutilExecChannel extends PhutilChannel { * any output on stderr. * * @param callable $handler Handler to invoke when stderr data is received. - * @return this + * @return $this */ public function setStderrHandler($handler) { $this->stderrHandler = $handler; diff --git a/src/channel/PhutilProtocolChannel.php b/src/channel/PhutilProtocolChannel.php index 1670857e..80d18a1c 100644 --- a/src/channel/PhutilProtocolChannel.php +++ b/src/channel/PhutilProtocolChannel.php @@ -47,7 +47,7 @@ abstract class PhutilProtocolChannel extends PhutilChannelChannel { * Write a message to the channel. * * @param wild $message Some message. - * @return this + * @return $this * * @task io */ @@ -62,7 +62,7 @@ abstract class PhutilProtocolChannel extends PhutilChannelChannel { * you can use it to inject out-of-band messages. * * @param wild $message Some message. - * @return this + * @return $this * * @task io */ diff --git a/src/console/view/PhutilConsoleView.php b/src/console/view/PhutilConsoleView.php index 39fe58c6..a9a41724 100644 --- a/src/console/view/PhutilConsoleView.php +++ b/src/console/view/PhutilConsoleView.php @@ -22,7 +22,7 @@ abstract class PhutilConsoleView extends Phobject { /** * Draw a view to the console. * - * @return this + * @return $this * @task draw */ final public function draw() { diff --git a/src/filesystem/FileFinder.php b/src/filesystem/FileFinder.php index 4eb2c3fd..3578047b 100644 --- a/src/filesystem/FileFinder.php +++ b/src/filesystem/FileFinder.php @@ -32,7 +32,7 @@ final class FileFinder extends Phobject { * Create a new FileFinder. * * @param string $root Root directory to find files beneath. - * @return this + * @return $this * @task create */ public function __construct($root) { diff --git a/src/filesystem/FileList.php b/src/filesystem/FileList.php index 89eb6f7d..e17a4552 100644 --- a/src/filesystem/FileList.php +++ b/src/filesystem/FileList.php @@ -27,7 +27,7 @@ final class FileList extends Phobject { * Build a new FileList from an array of paths, e.g. from $argv. * * @param list $paths List of relative or absolute file paths. - * @return this + * @return $this * @task create */ public function __construct($paths) { diff --git a/src/filesystem/PhutilDeferredLog.php b/src/filesystem/PhutilDeferredLog.php index e2d1ac35..78729ac1 100644 --- a/src/filesystem/PhutilDeferredLog.php +++ b/src/filesystem/PhutilDeferredLog.php @@ -86,7 +86,7 @@ final class PhutilDeferredLog extends Phobject { * the values you provide. * * @param dict $map Map of variables to values. - * @return this + * @return $this * @task log */ public function setData(array $map) { @@ -117,7 +117,7 @@ final class PhutilDeferredLog extends Phobject { * * @param string|null $file File where the entry should be written to, or * null to prevent writes. - * @return this + * @return $this * @task log */ public function setFile($file) { @@ -166,7 +166,7 @@ final class PhutilDeferredLog extends Phobject { * A log object will never write more than once, so it is safe to call this * method even if the object's destructor later runs. * - * @return this + * @return $this * @task write */ public function write() { diff --git a/src/filesystem/PhutilLock.php b/src/filesystem/PhutilLock.php index 3be495e1..86b74997 100644 --- a/src/filesystem/PhutilLock.php +++ b/src/filesystem/PhutilLock.php @@ -146,7 +146,7 @@ abstract class PhutilLock extends Phobject { * * @param float $wait (optional) Seconds to block waiting for the lock. By * default, do not block. - * @return this + * @return $this * * @task lock */ @@ -186,7 +186,7 @@ abstract class PhutilLock extends Phobject { * Release the lock. Throws an exception on failure, e.g. if the lock is not * currently held. * - * @return this + * @return $this * * @task lock */ diff --git a/src/filesystem/TempFile.php b/src/filesystem/TempFile.php index ec493a7f..0596ed3c 100644 --- a/src/filesystem/TempFile.php +++ b/src/filesystem/TempFile.php @@ -63,7 +63,7 @@ final class TempFile extends Phobject { * can set it to be preserved instead. * * @param bool $preserve True to preserve the file after object destruction. - * @return this + * @return $this * @task config */ public function setPreserveFile($preserve) { diff --git a/src/filesystem/linesofalarge/LinesOfALarge.php b/src/filesystem/linesofalarge/LinesOfALarge.php index 4b030bd9..e4a5fa3a 100644 --- a/src/filesystem/linesofalarge/LinesOfALarge.php +++ b/src/filesystem/linesofalarge/LinesOfALarge.php @@ -57,7 +57,7 @@ abstract class LinesOfALarge extends Phobject implements Iterator { * the output of a command which returns a large amount of data. * * @param string|null $character A one-byte delimiter character. - * @return this + * @return $this * @task config */ final public function setDelimiter($character) { diff --git a/src/future/FutureIterator.php b/src/future/FutureIterator.php index 593d4942..d2ef715e 100644 --- a/src/future/FutureIterator.php +++ b/src/future/FutureIterator.php @@ -135,7 +135,7 @@ final class FutureIterator * * @param float $interval Maximum number of seconds to block waiting on * futures before yielding null. - * @return this + * @return $this * * @task config */ @@ -155,7 +155,7 @@ final class FutureIterator * } * * @param int $max Maximum number of simultaneous jobs allowed. - * @return this + * @return $this * * @task config */ diff --git a/src/future/exec/ExecFuture.php b/src/future/exec/ExecFuture.php index 5c25fc97..056dc8e4 100644 --- a/src/future/exec/ExecFuture.php +++ b/src/future/exec/ExecFuture.php @@ -120,7 +120,7 @@ final class ExecFuture extends PhutilExecutableFuture { * NOTE: Setting this to 0 means "no buffer", not "unlimited buffer". * * @param int $limit Maximum size of the stdout read buffer. - * @return this + * @return $this * @task config */ public function setStdoutSizeLimit($limit) { @@ -134,7 +134,7 @@ final class ExecFuture extends PhutilExecutableFuture { * See @{method:setStdoutSizeLimit} for discussion. * * @param int $limit Maximum size of the stderr read buffer. - * @return this + * @return $this * @task config */ public function setStderrSizeLimit($limit) { @@ -155,7 +155,7 @@ final class ExecFuture extends PhutilExecutableFuture { * * @param int|null $read_buffer_size Maximum buffer size, or `null` for * unlimited. - * @return this + * @return $this */ public function setReadBufferSize($read_buffer_size) { $this->readBufferSize = $read_buffer_size; @@ -240,7 +240,7 @@ final class ExecFuture extends PhutilExecutableFuture { * that commands which listen for EOF will execute. If you want * to keep the pipe open past the start of command execution, do * an empty write with `$keep_pipe = true` first. - * @return this + * @return $this * @task interact */ public function write($data, $keep_pipe = false) { @@ -268,7 +268,7 @@ final class ExecFuture extends PhutilExecutableFuture { * future resolves. This is almost certainly only useful if you need the * buffer memory for some reason. * - * @return this + * @return $this * @task interact */ public function discardBuffers() { @@ -311,7 +311,7 @@ final class ExecFuture extends PhutilExecutableFuture { * * @param int $seconds Maximum number of seconds this command may execute for * before it is signaled. - * @return this + * @return $this * @task config */ public function setTimeout($seconds) { diff --git a/src/future/exec/PhutilExecutableFuture.php b/src/future/exec/PhutilExecutableFuture.php index b4c490b9..696815be 100644 --- a/src/future/exec/PhutilExecutableFuture.php +++ b/src/future/exec/PhutilExecutableFuture.php @@ -63,7 +63,7 @@ abstract class PhutilExecutableFuture extends Future { * @param map $env Dictionary of environmental variables. * @param bool $wipe_process_env (optional) Pass `true` to replace the * existing environment. - * @return this + * @return $this * * @task config */ @@ -89,7 +89,7 @@ abstract class PhutilExecutableFuture extends Future { * * @param string $key Environmental variable name. * @param string|null $value New value, or null to remove this variable. - * @return this + * @return $this * @task config */ final public function updateEnv($key, $value) { @@ -161,7 +161,7 @@ abstract class PhutilExecutableFuture extends Future { * current working directory. * * @param string $cwd Directory to execute the subprocess in. - * @return this + * @return $this * @task config */ final public function setCWD($cwd) { diff --git a/src/future/http/BaseHTTPFuture.php b/src/future/http/BaseHTTPFuture.php index 53929be1..0c29117f 100644 --- a/src/future/http/BaseHTTPFuture.php +++ b/src/future/http/BaseHTTPFuture.php @@ -59,7 +59,7 @@ abstract class BaseHTTPFuture extends Future { * isTimeout() on the status object. * * @param float $timeout Maximum timeout, in seconds. - * @return this + * @return $this * @task config */ public function setTimeout($timeout) { @@ -84,7 +84,7 @@ abstract class BaseHTTPFuture extends Future { * By default, requests use "GET". * * @param string $method HTTP method name. - * @return this + * @return $this * @task config */ final public function setMethod($method) { @@ -125,7 +125,7 @@ abstract class BaseHTTPFuture extends Future { * parameter. * * @param string $uri URI to send the request to. - * @return this + * @return $this * @task config */ public function setURI($uri) { @@ -152,7 +152,7 @@ abstract class BaseHTTPFuture extends Future { * case it will be encoded and sent as 'application/x-www-form-urlencoded'). * * @param mixed $data Data to send with the request. - * @return this + * @return $this * @task config */ public function setData($data) { @@ -181,7 +181,7 @@ abstract class BaseHTTPFuture extends Future { * * @param string $name Header name, like "Accept-Language". * @param string $value Header value, like "en-us". - * @return this + * @return $this * @task config */ public function addHeader($name, $value) { @@ -230,7 +230,7 @@ abstract class BaseHTTPFuture extends Future { * * @param array|null $status_codes List of expected HTTP status codes. * - * @return this + * @return $this * @task config */ public function setExpectStatus($status_codes) { @@ -253,7 +253,7 @@ abstract class BaseHTTPFuture extends Future { * * @param string $username Username to authenticate with. * @param PhutilOpaqueEnvelope $password Password to authenticate with. - * @return this + * @return $this * @task config */ public function setHTTPBasicAuthCredentials( diff --git a/src/future/http/HTTPSFuture.php b/src/future/http/HTTPSFuture.php index 22f78ea5..fae99698 100644 --- a/src/future/http/HTTPSFuture.php +++ b/src/future/http/HTTPSFuture.php @@ -41,7 +41,7 @@ final class HTTPSFuture extends BaseHTTPFuture { * * @param string $certificate The multi-line, possibly lengthy, SSL * certificate to use. - * @return this + * @return $this */ public function setCABundleFromString($certificate) { $temp = new TempFile(); @@ -54,7 +54,7 @@ final class HTTPSFuture extends BaseHTTPFuture { * Set the SSL certificate to use for this session, given a path. * * @param string $path The path to a valid SSL certificate for this session - * @return this + * @return $this */ public function setCABundleFromPath($path) { $this->cabundle = $path; @@ -76,7 +76,7 @@ final class HTTPSFuture extends BaseHTTPFuture { * * @param boolean $follow true to follow any Location header present in the * response, false to return the request directly - * @return this + * @return $this */ public function setFollowLocation($follow) { $this->followLocation = $follow; @@ -191,7 +191,7 @@ final class HTTPSFuture extends BaseHTTPFuture { * @param string $data File content. * @param string $name File name. * @param string $mime_type File mime type. - * @return this + * @return $this */ public function attachFileData($key, $data, $name, $mime_type) { if (isset($this->files[$key])) { @@ -627,7 +627,7 @@ final class HTTPSFuture extends BaseHTTPFuture { * Discard any buffered data. Normally, you call this after reading the * data with @{method:read}. * - * @return this + * @return $this */ public function discardBuffers() { if ($this->isDownload()) { @@ -831,7 +831,7 @@ final class HTTPSFuture extends BaseHTTPFuture { * You must write the entire body before starting the request. * * @param string $raw_body Raw body. - * @return this + * @return $this */ public function write($raw_body) { $this->rawBody = $raw_body; diff --git a/src/hgdaemon/ArcanistHgProxyClient.php b/src/hgdaemon/ArcanistHgProxyClient.php index af9d8db9..d3d23779 100644 --- a/src/hgdaemon/ArcanistHgProxyClient.php +++ b/src/hgdaemon/ArcanistHgProxyClient.php @@ -57,7 +57,7 @@ final class ArcanistHgProxyClient extends Phobject { * When connecting, do not expect the "capabilities" message. * * @param bool $skip True to skip the "capabilities" message. - * @return this + * @return $this * * @task config */ diff --git a/src/hgdaemon/ArcanistHgProxyServer.php b/src/hgdaemon/ArcanistHgProxyServer.php index b39a15bc..da7fc2b6 100644 --- a/src/hgdaemon/ArcanistHgProxyServer.php +++ b/src/hgdaemon/ArcanistHgProxyServer.php @@ -68,7 +68,7 @@ final class ArcanistHgProxyServer extends Phobject { * Disable status messages to stdout. Controlled with `--quiet`. * * @param bool $quiet True to disable status messages. - * @return this + * @return $this * * @task config */ @@ -86,7 +86,7 @@ final class ArcanistHgProxyServer extends Phobject { * to profile the server. * * @param int $limit Client limit, or 0 to disable limit. - * @return this + * @return $this * * @task config */ @@ -101,7 +101,7 @@ final class ArcanistHgProxyServer extends Phobject { * will exit. Controlled with `--idle-limit`. * * @param int $limit Idle limit, or 0 to disable limit. - * @return this + * @return $this * * @task config */ @@ -118,7 +118,7 @@ final class ArcanistHgProxyServer extends Phobject { * improves performance. Controlled with --skip-hello. * * @param bool $skip True to skip the "capabilities" message. - * @return this + * @return $this * * @task config */ @@ -133,7 +133,7 @@ final class ArcanistHgProxyServer extends Phobject { * Controlled by --do-not-daemonize. Primarily useful for debugging. * * @param bool $do_not_daemonize True to run in the foreground. - * @return this + * @return $this * * @task config */ diff --git a/src/lint/engine/ArcanistLintEngine.php b/src/lint/engine/ArcanistLintEngine.php index 1ea5b84c..9d38e9e7 100644 --- a/src/lint/engine/ArcanistLintEngine.php +++ b/src/lint/engine/ArcanistLintEngine.php @@ -292,7 +292,7 @@ abstract class ArcanistLintEngine extends Phobject { /** * @param dict>> * $results - * @return this + * @return $this */ final public function setCachedResults(array $results) { $this->cachedResults = $results; @@ -437,7 +437,7 @@ abstract class ArcanistLintEngine extends Phobject { * * @param string $key Resource identifier. * @param wild $value Resource. - * @return this + * @return $this */ public function setLinterResource($key, $value) { $this->linterResources[$key] = $value; diff --git a/src/lint/linter/ArcanistExternalLinter.php b/src/lint/linter/ArcanistExternalLinter.php index 24e1c09f..51877e2b 100644 --- a/src/lint/linter/ArcanistExternalLinter.php +++ b/src/lint/linter/ArcanistExternalLinter.php @@ -105,7 +105,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter { * by @{method:getDefaultFlags} are used. * * @param list $flags New flags. - * @return this + * @return $this * @task bin */ final public function setFlags(array $flags) { @@ -117,7 +117,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter { * Set the binary's version requirement. * * @param string $version Version requirement. - * @return this + * @return $this * @task bin */ final public function setVersionRequirement($version) { @@ -152,7 +152,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter { * Override the default binary with a new one. * * @param string $bin New binary. - * @return this + * @return $this * @task bin */ final public function setBinary($bin) { @@ -201,7 +201,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter { * Set the interpreter, overriding any default. * * @param string $interpreter New interpreter. - * @return this + * @return $this * @task bin */ final public function setInterpreter($interpreter) { diff --git a/src/lint/linter/ArcanistLinter.php b/src/lint/linter/ArcanistLinter.php index 4fc50861..843a9e40 100644 --- a/src/lint/linter/ArcanistLinter.php +++ b/src/lint/linter/ArcanistLinter.php @@ -132,7 +132,7 @@ abstract class ArcanistLinter extends Phobject { * This ID is assigned automatically by the @{class:ArcanistLintEngine}. * * @param string $id Unique linter ID. - * @return this + * @return $this * @task state */ final public function setLinterID($id) { diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php index d5194319..e330f856 100644 --- a/src/lint/linter/ArcanistXHPASTLinter.php +++ b/src/lint/linter/ArcanistXHPASTLinter.php @@ -30,7 +30,7 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter { * linter rules in isolation. By default, all linter rules will be enabled. * * @param list $rules - * @return this + * @return $this */ public function setRules(array $rules) { assert_instances_of($rules, 'ArcanistXHPASTLinterRule'); diff --git a/src/lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php b/src/lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php index 24ccb577..fba5b720 100644 --- a/src/lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php +++ b/src/lint/linter/xhpast/ArcanistXHPASTLintNamingHook.php @@ -17,7 +17,7 @@ abstract class ArcanistXHPASTLintNamingHook extends Phobject { * The constructor is final because @{class:ArcanistXHPASTLinter} is * responsible for hook instantiation. * - * @return this + * @return $this * @task internals */ final public function __construct() { diff --git a/src/moduleutils/PhutilLibraryMapBuilder.php b/src/moduleutils/PhutilLibraryMapBuilder.php index e0f7afab..38a1bd21 100644 --- a/src/moduleutils/PhutilLibraryMapBuilder.php +++ b/src/moduleutils/PhutilLibraryMapBuilder.php @@ -41,7 +41,7 @@ final class PhutilLibraryMapBuilder extends Phobject { * Control subprocess parallelism limit. Use `--limit` to set this. * * @param int $limit Maximum number of subprocesses to run in parallel. - * @return this + * @return $this * * @task map */ diff --git a/src/parser/PhutilSimpleOptions.php b/src/parser/PhutilSimpleOptions.php index c763051b..bea5b33d 100644 --- a/src/parser/PhutilSimpleOptions.php +++ b/src/parser/PhutilSimpleOptions.php @@ -163,7 +163,7 @@ final class PhutilSimpleOptions extends Phobject { * * @param bool $case_sensitive True to make the parser case sensitive, false * to make it case-insensitive. - * @return this + * @return $this * @task config */ public function setCaseSensitive($case_sensitive) { diff --git a/src/parser/argument/PhutilArgumentParser.php b/src/parser/argument/PhutilArgumentParser.php index fccb8e9d..1d6f3a23 100644 --- a/src/parser/argument/PhutilArgumentParser.php +++ b/src/parser/argument/PhutilArgumentParser.php @@ -115,7 +115,7 @@ final class PhutilArgumentParser extends Phobject { * @{class:PhutilArgumentSpecification}. * @param bool $initial_only (optional) Require flags appear before any * non-flag arguments. - * @return this + * @return $this * @task parse */ public function parsePartial(array $specs, $initial_only = false) { @@ -123,7 +123,7 @@ final class PhutilArgumentParser extends Phobject { } /** - * @return this + * @return $this */ private function parseInternal( array $specs, @@ -313,7 +313,7 @@ final class PhutilArgumentParser extends Phobject { * * @param list $specs List of argument specs, see * @{class:PhutilArgumentSpecification}. - * @return this + * @return $this * @task parse */ public function parseFull(array $specs) { @@ -349,7 +349,7 @@ final class PhutilArgumentParser extends Phobject { * * @param list $specs List of argument specs, see * @{class:PhutilArgumentSpecification}. - * @return this + * @return $this * @task parse */ public function parse(array $specs) { @@ -370,7 +370,7 @@ final class PhutilArgumentParser extends Phobject { * * @param list $workflows List of argument specs, see * @{class:PhutilArgumentSpecification}. - * @return this + * @return $this * @task parse */ public function parseWorkflows(array $workflows) { @@ -506,7 +506,7 @@ final class PhutilArgumentParser extends Phobject { * --xprofile Write out an XHProf profile. * --help Show help. * - * @return this + * @return $this * * @phutil-external-symbol function xhprof_enable */ diff --git a/src/repository/api/ArcanistRepositoryAPI.php b/src/repository/api/ArcanistRepositoryAPI.php index dd35db2f..06eba76b 100644 --- a/src/repository/api/ArcanistRepositoryAPI.php +++ b/src/repository/api/ArcanistRepositoryAPI.php @@ -269,7 +269,7 @@ abstract class ArcanistRepositoryAPI extends Phobject { * Drops caches after changes to the working copy. By default, some queries * against the working copy are cached. They * - * @return this + * @return $this * @task status */ final public function reloadWorkingCopy() { diff --git a/src/symbols/PhutilClassMapQuery.php b/src/symbols/PhutilClassMapQuery.php index 702ba441..a8bc8080 100644 --- a/src/symbols/PhutilClassMapQuery.php +++ b/src/symbols/PhutilClassMapQuery.php @@ -61,7 +61,7 @@ final class PhutilClassMapQuery extends Phobject { * of. * * @param string $class Ancestor class or interface name. - * @return this + * @return $this * @task config */ public function setAncestorClass($class) { @@ -82,7 +82,7 @@ final class PhutilClassMapQuery extends Phobject { * @param string $unique_method Name of the unique key method. * @param bool $filter_null (optional) If true, then classes which return * `null` will be filtered from the results. - * @return this + * @return $this * @task config */ public function setUniqueMethod($unique_method, $filter_null = false) { @@ -126,7 +126,7 @@ final class PhutilClassMapQuery extends Phobject { * each instance with @{method:setUniqueMethod}. * * @param string $expand_method Name of the expansion method. - * @return this + * @return $this * @task config */ public function setExpandMethod($expand_method) { @@ -142,7 +142,7 @@ final class PhutilClassMapQuery extends Phobject { * name. * * @param string $sort_method Name of the sorting method. - * @return this + * @return $this * @task config */ public function setSortMethod($sort_method) { @@ -155,7 +155,7 @@ final class PhutilClassMapQuery extends Phobject { * Provide a method to filter the map. * * @param string $filter_method Name of the filtering method. - * @return this + * @return $this * @task config */ public function setFilterMethod($filter_method) { diff --git a/src/symbols/PhutilSymbolLoader.php b/src/symbols/PhutilSymbolLoader.php index 795b0803..12566a2f 100644 --- a/src/symbols/PhutilSymbolLoader.php +++ b/src/symbols/PhutilSymbolLoader.php @@ -57,7 +57,7 @@ final class PhutilSymbolLoader { * `interface`. * * @param string $type Type of symbol to load. - * @return this + * @return $this * * @task config */ @@ -72,7 +72,7 @@ final class PhutilSymbolLoader { * library will be loaded. * * @param string $library Library name. - * @return this + * @return $this * * @task config */ @@ -91,7 +91,7 @@ final class PhutilSymbolLoader { * in files below that path will be selected. * * @param string $path Path relative to library root, like "apps/cheese/". - * @return this + * @return $this * * @task config */ @@ -106,7 +106,7 @@ final class PhutilSymbolLoader { * or function name. * * @param string $name Symbol name. - * @return this + * @return $this * * @task config */ @@ -122,7 +122,7 @@ final class PhutilSymbolLoader { * implies loading only classes. * * @param string $base Base class name. - * @return this + * @return $this * * @task config */ @@ -140,7 +140,7 @@ final class PhutilSymbolLoader { * @{method:selectSymbolsWithoutLoading}. * * @param bool $concrete True if the query should load only concrete symbols. - * @return this + * @return $this * * @task config */ diff --git a/src/unit/ArcanistUnitTestResult.php b/src/unit/ArcanistUnitTestResult.php index fb26ee9d..07a1d0d1 100644 --- a/src/unit/ArcanistUnitTestResult.php +++ b/src/unit/ArcanistUnitTestResult.php @@ -81,7 +81,7 @@ final class ArcanistUnitTestResult extends Phobject { * 3 seconds, or `0.125` for 125 milliseconds. * * @param int|float $duration Duration, in seconds. - * @return this + * @return $this */ public function setDuration($duration) { if (!is_int($duration) && !is_float($duration)) { diff --git a/src/upload/ArcanistFileDataRef.php b/src/upload/ArcanistFileDataRef.php index c1aa4d56..c3e6adcb 100644 --- a/src/upload/ArcanistFileDataRef.php +++ b/src/upload/ArcanistFileDataRef.php @@ -41,7 +41,7 @@ final class ArcanistFileDataRef extends Phobject { * human consumption. * * @param string $name Filename. - * @return this + * @return $this * @task config */ public function setName($name) { @@ -92,7 +92,7 @@ final class ArcanistFileDataRef extends Phobject { * should also call @{method:setName}. * * @param string $path Path on disk to a file containing data to upload. - * @return this + * @return $this * @task config */ public function setPath($path) { @@ -134,7 +134,7 @@ final class ArcanistFileDataRef extends Phobject { * timestamp. The file will be deleted after this time. * * @param int $epoch Epoch timestamp to retain the file until. - * @return this + * @return $this * @task config */ public function setDeleteAfterEpoch($epoch) { diff --git a/src/upload/ArcanistFileUploader.php b/src/upload/ArcanistFileUploader.php index cc4217be..4c4b32cd 100644 --- a/src/upload/ArcanistFileUploader.php +++ b/src/upload/ArcanistFileUploader.php @@ -48,7 +48,7 @@ final class ArcanistFileUploader extends Phobject { * * @param ArcanistFileDataRef $file File data to upload. * @param null|string $key (optional) Key to use to identify this file. - * @return this + * @return $this * @task add */ public function addFile(ArcanistFileDataRef $file, $key = null) { diff --git a/src/utils/AbstractDirectedGraph.php b/src/utils/AbstractDirectedGraph.php index 4e7db69a..2bd0385d 100644 --- a/src/utils/AbstractDirectedGraph.php +++ b/src/utils/AbstractDirectedGraph.php @@ -70,7 +70,7 @@ abstract class AbstractDirectedGraph extends Phobject { * * @param dict $nodes A map of nodes to the nodes reachable along their * edges - * @return this + * @return $this * @task build */ final public function addNodes(array $nodes) { @@ -219,7 +219,7 @@ abstract class AbstractDirectedGraph extends Phobject { * constructs the graph level-by-level, calling @{method:loadEdges} to * expand the graph at each stage until it is complete. * - * @return this + * @return $this * @task build */ final public function loadGraph() { diff --git a/src/utils/PhutilBufferedIterator.php b/src/utils/PhutilBufferedIterator.php index 598629f7..f15b7d75 100644 --- a/src/utils/PhutilBufferedIterator.php +++ b/src/utils/PhutilBufferedIterator.php @@ -62,7 +62,7 @@ abstract class PhutilBufferedIterator extends Phobject implements Iterator { * Configure the page size. Note that implementations may ignore this. * * @param int $size Page size. - * @return this + * @return $this * @task config */ final public function setPageSize($size) { diff --git a/src/utils/PhutilRope.php b/src/utils/PhutilRope.php index bb0ddb7f..36eae9ba 100644 --- a/src/utils/PhutilRope.php +++ b/src/utils/PhutilRope.php @@ -20,7 +20,7 @@ final class PhutilRope extends Phobject { * Append a string to the rope. * * @param string $string String to append. - * @return this + * @return $this */ public function append($string) { if (!strlen($string)) { @@ -109,7 +109,7 @@ final class PhutilRope extends Phobject { * Remove a specified number of bytes from the head of the rope. * * @param int $remove Bytes to remove. - * @return this + * @return $this */ public function removeBytesFromHead($remove) { if ($remove <= 0) { diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php index 9522812b..7efc006e 100644 --- a/src/workflow/ArcanistWorkflow.php +++ b/src/workflow/ArcanistWorkflow.php @@ -317,7 +317,7 @@ abstract class ArcanistWorkflow extends Phobject { * * @param string $conduit_uri The URI to open a conduit to when * @{method:establishConduit} is called. - * @return this + * @return $this * @task conduit */ final public function setConduitURI($conduit_uri) { @@ -352,7 +352,7 @@ abstract class ArcanistWorkflow extends Phobject { * NOTE: You must call @{method:setConduitURI} before you can call this * method. * - * @return this + * @return $this * @task conduit */ final public function establishConduit() { @@ -409,7 +409,7 @@ abstract class ArcanistWorkflow extends Phobject { * * @param dict $credentials A credential dictionary, see * @{method:authenticateConduit}. - * @return this + * @return $this * @task conduit */ final public function setConduitCredentials(array $credentials) { @@ -458,7 +458,7 @@ abstract class ArcanistWorkflow extends Phobject { * NOTE: You must call @{method:setConduitURI} and * @{method:setConduitCredentials} before you invoke this method. * - * @return this + * @return $this * @task conduit */ final public function authenticateConduit() {