mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Fix errors found by PHPStan
Test Plan: None. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D17376
This commit is contained in:
parent
d0353d2381
commit
3b6b523c2b
9 changed files with 12 additions and 11 deletions
|
@ -40,7 +40,8 @@ final class ArcanistLintMessage extends Phobject {
|
|||
$message->setGranularity(idx($dict, 'granularity'));
|
||||
$message->setOtherLocations(idx($dict, 'locations', array()));
|
||||
if (isset($dict['bypassChangedLineFiltering'])) {
|
||||
$message->bypassChangedLineFiltering($dict['bypassChangedLineFiltering']);
|
||||
$message->setBypassChangedLineFiltering(
|
||||
$dict['bypassChangedLineFiltering']);
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
|
|
@ -369,7 +369,7 @@ final class ArcanistPHPCompatibilityXHPASTLinterRule
|
|||
}
|
||||
}
|
||||
|
||||
$literals = $root->selectDescendantsOftype('n_ARRAY_LITERAL');
|
||||
$literals = $root->selectDescendantsOfType('n_ARRAY_LITERAL');
|
||||
foreach ($literals as $literal) {
|
||||
$open_token = head($literal->getTokens())->getValue();
|
||||
if ($open_token == '[') {
|
||||
|
|
|
@ -1405,7 +1405,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
|||
* or cycle locally.
|
||||
*
|
||||
* @param string Ref to start from.
|
||||
* @return list<wild> Path to an upstream.
|
||||
* @return ArcanistGitUpstreamPath Path to an upstream.
|
||||
*/
|
||||
public function getPathToUpstream($start) {
|
||||
$cursor = $start;
|
||||
|
|
|
@ -791,7 +791,7 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
|||
'commit --amend -l %s',
|
||||
$tmp_file);
|
||||
} catch (CommandException $ex) {
|
||||
if (preg_match('/nothing changed/', $ex->getStdOut())) {
|
||||
if (preg_match('/nothing changed/', $ex->getStdout())) {
|
||||
// NOTE: Mercurial considers it an error to make a no-op amend. Although
|
||||
// we generally defer to the underlying VCS to dictate behavior, this
|
||||
// one seems a little goofy, and we use amend as part of various
|
||||
|
|
|
@ -282,7 +282,7 @@ abstract class ArcanistRepositoryAPI extends Phobject {
|
|||
* Hook for implementations to dirty working copy caches after the working
|
||||
* copy has been updated.
|
||||
*
|
||||
* @return this
|
||||
* @return void
|
||||
* @task status
|
||||
*/
|
||||
protected function didReloadWorkingCopy() {
|
||||
|
|
|
@ -255,7 +255,7 @@ class XUnitTestEngine extends ArcanistUnitTestEngine {
|
|||
throw $exc;
|
||||
}
|
||||
$result->setResult(ArcanistUnitTestResult::RESULT_FAIL);
|
||||
$result->setUserdata($exc->getStdout());
|
||||
$result->setUserData($exc->getStdout());
|
||||
}
|
||||
|
||||
$result->setDuration(microtime(true) - $regenerate_start);
|
||||
|
@ -301,7 +301,7 @@ class XUnitTestEngine extends ArcanistUnitTestEngine {
|
|||
throw $exc;
|
||||
}
|
||||
$result->setResult(ArcanistUnitTestResult::RESULT_FAIL);
|
||||
$result->setUserdata($exc->getStdout());
|
||||
$result->setUserData($exc->getStdout());
|
||||
$build_failed = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -886,7 +886,7 @@ EOTEXT
|
|||
}
|
||||
} catch (CommandException $ex) {
|
||||
$err = $ex->getError();
|
||||
$stdout = $ex->getStdOut();
|
||||
$stdout = $ex->getStdout();
|
||||
|
||||
// Copied from: PhabricatorRepositoryPullLocalDaemon.php
|
||||
// NOTE: Between versions 2.1 and 2.1.1, Mercurial changed the
|
||||
|
|
|
@ -710,7 +710,7 @@ EOTEXT
|
|||
}
|
||||
|
||||
// in case there were any submodule changes involved
|
||||
$repository_api->execpassthru('submodule update --init --recursive');
|
||||
$repository_api->execPassthru('submodule update --init --recursive');
|
||||
|
||||
if ($this->shouldCommit()) {
|
||||
if ($bundle->getFullAuthor()) {
|
||||
|
@ -763,7 +763,7 @@ EOTEXT
|
|||
echo phutil_console_format(
|
||||
"\n<bg:red>** %s **</bg>\n",
|
||||
pht('Patch Failed!'));
|
||||
$stderr = $ex->getStdErr();
|
||||
$stderr = $ex->getStderr();
|
||||
if (preg_match('/case-folding collision/', $stderr)) {
|
||||
echo phutil_console_wrap(
|
||||
phutil_console_format(
|
||||
|
|
|
@ -336,7 +336,7 @@ abstract class ArcanistWorkflow extends Phobject {
|
|||
|
||||
$this->conduitAuthenticated = true;
|
||||
|
||||
return;
|
||||
return $this;
|
||||
} catch (Exception $ex) {
|
||||
$conduit->setConduitToken(null);
|
||||
throw $ex;
|
||||
|
|
Loading…
Reference in a new issue