1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +01:00

Remove unnecessary empty checks from willFilterPage()

Summary: Fixes T3600. These checks are obsolete after D6512.

Test Plan: Syntax / static / inspection.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3600

Differential Revision: https://secure.phabricator.com/D6563
This commit is contained in:
epriestley 2013-07-24 15:30:26 -07:00
parent 3eae2592d8
commit 9383abc6b0
10 changed files with 0 additions and 40 deletions

View file

@ -360,10 +360,6 @@ final class DifferentialRevisionQuery
} }
public function willFilterPage(array $revisions) { public function willFilterPage(array $revisions) {
if (!$revisions) {
return $revisions;
}
$table = new DifferentialRevision(); $table = new DifferentialRevision();
$conn_r = $table->establishConnection('r'); $conn_r = $table->establishConnection('r');

View file

@ -75,10 +75,6 @@ final class DivinerAtomQuery
} }
protected function willFilterPage(array $atoms) { protected function willFilterPage(array $atoms) {
if (!$atoms) {
return $atoms;
}
$books = array_unique(mpull($atoms, 'getBookPHID')); $books = array_unique(mpull($atoms, 'getBookPHID'));
$books = id(new DivinerBookQuery()) $books = id(new DivinerBookQuery())

View file

@ -75,10 +75,6 @@ final class LegalpadDocumentQuery
} }
protected function willFilterPage(array $documents) { protected function willFilterPage(array $documents) {
if (!$documents) {
return $documents;
}
if ($this->needDocumentBodies) { if ($this->needDocumentBodies) {
$documents = $this->loadDocumentBodies($documents); $documents = $this->loadDocumentBodies($documents);
} }

View file

@ -157,10 +157,6 @@ final class PhabricatorMacroQuery
} }
protected function willFilterPage(array $macros) { protected function willFilterPage(array $macros) {
if (!$macros) {
return array();
}
$file_phids = mpull($macros, 'getFilePHID'); $file_phids = mpull($macros, 'getFilePHID');
$files = id(new PhabricatorFileQuery()) $files = id(new PhabricatorFileQuery())
->setViewer($this->getViewer()) ->setViewer($this->getViewer())

View file

@ -85,10 +85,6 @@ final class PhabricatorPasteQuery
} }
protected function willFilterPage(array $pastes) { protected function willFilterPage(array $pastes) {
if (!$pastes) {
return $pastes;
}
if ($this->needRawContent) { if ($this->needRawContent) {
$pastes = $this->loadRawContent($pastes); $pastes = $this->loadRawContent($pastes);
} }

View file

@ -39,10 +39,6 @@ final class PhortuneAccountQuery
} }
protected function willFilterPage(array $accounts) { protected function willFilterPage(array $accounts) {
if (!$accounts) {
return array();
}
$query = id(new PhabricatorEdgeQuery()) $query = id(new PhabricatorEdgeQuery())
->withSourcePHIDs(mpull($accounts, 'getPHID')) ->withSourcePHIDs(mpull($accounts, 'getPHID'))
->withEdgeTypes(array(PhabricatorEdgeConfig::TYPE_ACCOUNT_HAS_MEMBER)); ->withEdgeTypes(array(PhabricatorEdgeConfig::TYPE_ACCOUNT_HAS_MEMBER));

View file

@ -47,10 +47,6 @@ final class PhortunePaymentMethodQuery
} }
protected function willFilterPage(array $methods) { protected function willFilterPage(array $methods) {
if (!$methods) {
return array();
}
$accounts = id(new PhortuneAccountQuery()) $accounts = id(new PhortuneAccountQuery())
->setViewer($this->getViewer()) ->setViewer($this->getViewer())
->withPHIDs(mpull($methods, 'getAccountPHID')) ->withPHIDs(mpull($methods, 'getAccountPHID'))

View file

@ -60,10 +60,6 @@ final class PhrictionDocumentQuery
} }
protected function willFilterPage(array $documents) { protected function willFilterPage(array $documents) {
if (!$documents) {
return array();
}
$contents = id(new PhrictionContent())->loadAllWhere( $contents = id(new PhrictionContent())->loadAllWhere(
'id IN (%Ld)', 'id IN (%Ld)',
mpull($documents, 'getContentID')); mpull($documents, 'getContentID'));

View file

@ -69,10 +69,6 @@ final class PhabricatorSlowvoteQuery
public function willFilterPage(array $polls) { public function willFilterPage(array $polls) {
assert_instances_of($polls, 'PhabricatorSlowvotePoll'); assert_instances_of($polls, 'PhabricatorSlowvotePoll');
if (!$polls) {
return array();
}
$ids = mpull($polls, 'getID'); $ids = mpull($polls, 'getID');
$viewer = $this->getViewer(); $viewer = $this->getViewer();

View file

@ -19,10 +19,6 @@ final class PhabricatorTokenReceiverQuery
} }
public function willFilterPage(array $phids) { public function willFilterPage(array $phids) {
if (!$phids) {
return array();
}
$objects = id(new PhabricatorObjectHandleData($phids)) $objects = id(new PhabricatorObjectHandleData($phids))
->setViewer($this->getViewer()) ->setViewer($this->getViewer())
->loadObjects(); ->loadObjects();