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/D17377
This commit is contained in:
@@ -52,7 +52,7 @@ final class DiffusionBrowseQueryConduitAPIMethod
|
||||
$commit,
|
||||
$path);
|
||||
} catch (CommandException $e) {
|
||||
$stderr = $e->getStdErr();
|
||||
$stderr = $e->getStderr();
|
||||
if (preg_match('/^fatal: Not a valid object name/', $stderr)) {
|
||||
// Grab two logs, since the first one is when the object was deleted.
|
||||
list($stdout) = $repository->execxLocalCommand(
|
||||
|
||||
@@ -446,7 +446,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
$header->setHeader(pht('Branches'));
|
||||
|
||||
if ($more_branches) {
|
||||
$header->setSubHeader(pht('Showing %d branches.', $limit));
|
||||
$header->setSubheader(pht('Showing %d branches.', $limit));
|
||||
}
|
||||
|
||||
$button = new PHUIButtonView();
|
||||
@@ -505,7 +505,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
$header->setHeader(pht('Tags'));
|
||||
|
||||
if ($more_tags) {
|
||||
$header->setSubHeader(
|
||||
$header->setSubheader(
|
||||
pht('Showing the %d most recent tags.', $tag_limit));
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,6 @@ final class DiffusionCommitEditEngine
|
||||
->setValue($object->getAuditorPHIDsForEdit());
|
||||
|
||||
$reason = $data->getCommitDetail('autocloseReason', false);
|
||||
$reason = PhabricatorRepository::BECAUSE_AUTOCLOSE_FORCED;
|
||||
if ($reason !== false) {
|
||||
switch ($reason) {
|
||||
case PhabricatorRepository::BECAUSE_REPOSITORY_IMPORTING:
|
||||
|
||||
@@ -46,7 +46,7 @@ final class HeraldPreCommitContentAdapter extends HeraldPreCommitAdapter {
|
||||
|
||||
if ($this->changesets instanceof Exception) {
|
||||
$ex_class = get_class($this->changesets);
|
||||
$ex_message = $this->changesets->getmessage();
|
||||
$ex_message = $this->changesets->getMessage();
|
||||
if ($type === 'name') {
|
||||
return array("<{$ex_class}: {$ex_message}>");
|
||||
} else {
|
||||
|
||||
@@ -271,13 +271,13 @@ final class DiffusionLowLevelResolveRefsQuery
|
||||
try {
|
||||
list($stdout) = $future->resolvex();
|
||||
} catch (CommandException $ex) {
|
||||
if (preg_match('/ambiguous identifier/', $ex->getStdErr())) {
|
||||
if (preg_match('/ambiguous identifier/', $ex->getStderr())) {
|
||||
// This indicates that the ref ambiguously matched several things.
|
||||
// Eventually, it would be nice to return all of them, but it is
|
||||
// unclear how to best do that. For now, treat it as a miss instead.
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/unknown revision/', $ex->getStdErr())) {
|
||||
if (preg_match('/unknown revision/', $ex->getStderr())) {
|
||||
// No matches for this ref.
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user