Fix errors found by PHPStan
Test Plan: Ran `phpstan analyze -a autoload.php phabricator/src`. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, hach-que Differential Revision: https://secure.phabricator.com/D17371
This commit is contained in:
@@ -201,7 +201,7 @@ final class DiffusionDiffQueryConduitAPIMethod
|
||||
|
||||
$effective_commit = $this->getEffectiveCommit($request);
|
||||
if (!$effective_commit) {
|
||||
return $this->getEmptyResult(1);
|
||||
return $this->getEmptyResult();
|
||||
}
|
||||
|
||||
$raw_query = DiffusionRawDiffQuery::newFromDiffusionRequest($drequest)
|
||||
@@ -209,7 +209,7 @@ final class DiffusionDiffQueryConduitAPIMethod
|
||||
|
||||
$raw_diff = $raw_query->executeInline();
|
||||
if (!$raw_diff) {
|
||||
return $this->getEmptyResult(2);
|
||||
return $this->getEmptyResult();
|
||||
}
|
||||
|
||||
$parser = $this->getDefaultParser();
|
||||
|
||||
@@ -44,7 +44,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
||||
$is_file = ($reason == DiffusionBrowseResultSet::REASON_IS_FILE);
|
||||
|
||||
if ($is_file) {
|
||||
return $this->browseFile($results);
|
||||
return $this->browseFile();
|
||||
} else {
|
||||
$paths = $results->getPaths();
|
||||
$paths = $pager->sliceResults($paths);
|
||||
|
||||
@@ -357,7 +357,7 @@ abstract class DiffusionController extends PhabricatorController {
|
||||
$stable_commit = $drequest->getStableCommit();
|
||||
|
||||
$stable_commit_hash = PhabricatorHash::digestForIndex($stable_commit);
|
||||
$readme_path_hash = PhabricatorHash::digestForindex($readme_path);
|
||||
$readme_path_hash = PhabricatorHash::digestForIndex($readme_path);
|
||||
|
||||
$cache = PhabricatorCaches::getMutableStructureCache();
|
||||
$cache_key = "diffusion".
|
||||
|
||||
@@ -59,7 +59,7 @@ final class DiffusionHistoryController extends DiffusionController {
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($history_table);
|
||||
|
||||
$header = $this->buildHeader($drequest, $repository);
|
||||
$header = $this->buildHeader($drequest);
|
||||
|
||||
$crumbs = $this->buildCrumbs(
|
||||
array(
|
||||
|
||||
@@ -241,7 +241,7 @@ final class DiffusionRepositoryStatusManagementPanel
|
||||
}
|
||||
}
|
||||
|
||||
$doc_href = PhabricatorEnv::getDocLink('Managing Daemons with phd');
|
||||
$doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd');
|
||||
|
||||
$daemon_instructions = pht(
|
||||
'Use %s to start daemons. See %s.',
|
||||
|
||||
@@ -17,7 +17,7 @@ final class DiffusionCommitRequiredActionResultBucket
|
||||
|
||||
$this->objects = $objects;
|
||||
|
||||
$phids = $query->getEvaluatedParameter('responsiblePHIDs', array());
|
||||
$phids = $query->getEvaluatedParameter('responsiblePHIDs');
|
||||
if (!$phids) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
|
||||
Reference in New Issue
Block a user