mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Replace array_mergev(array()) by array_merge()
Test Plan: Save owners package. Reviewers: jungejason, epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2646
This commit is contained in:
parent
ec9589fb3b
commit
3102e15497
3 changed files with 6 additions and 8 deletions
|
@ -89,11 +89,10 @@ abstract class PackageMail {
|
|||
$paths = $package->loadPaths();
|
||||
$this->paths = mgroup($paths, 'getRepositoryPHID', 'getPath');
|
||||
|
||||
$phids = array_mergev(array(
|
||||
$phids = array_merge(
|
||||
$this->mailTo,
|
||||
array($package->getActorPHID()),
|
||||
array_keys($this->paths),
|
||||
));
|
||||
array_keys($this->paths));
|
||||
$this->handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
|
||||
}
|
||||
|
||||
|
|
|
@ -69,13 +69,12 @@ final class PackageModifyMail extends PackageMail {
|
|||
protected function loadData() {
|
||||
$this->mailTo = $this->allOwners;
|
||||
|
||||
$phids = array_mergev(array(
|
||||
$phids = array_merge(
|
||||
$this->allOwners,
|
||||
$this->touchedRepos,
|
||||
array(
|
||||
$this->getPackage()->getActorPHID(),
|
||||
),
|
||||
));
|
||||
));
|
||||
$this->handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
|
||||
}
|
||||
|
||||
|
|
|
@ -199,10 +199,10 @@ final class PhabricatorOwnersPackage extends PhabricatorOwnersDAO {
|
|||
}
|
||||
|
||||
$add_owners = array_diff_key($new_owners, $cur_owners);
|
||||
$all_owners = array_mergev(array(
|
||||
$all_owners = array_merge(
|
||||
array($this->getPrimaryOwnerPHID() => true),
|
||||
$new_owners,
|
||||
$remove_owners));
|
||||
$remove_owners);
|
||||
foreach ($add_owners as $phid => $ignored) {
|
||||
$owner = new PhabricatorOwnersOwner();
|
||||
$owner->setPackageID($this->getID());
|
||||
|
|
Loading…
Reference in a new issue