Differential D14846 Diff 35881 src/applications/owners/storage/PhabricatorOwnersPackageTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/storage/PhabricatorOwnersPackageTransaction.php
Show All 21 Lines | final class PhabricatorOwnersPackageTransaction | ||||
public function getRequiredHandlePHIDs() { | public function getRequiredHandlePHIDs() { | ||||
$phids = parent::getRequiredHandlePHIDs(); | $phids = parent::getRequiredHandlePHIDs(); | ||||
$old = $this->getOldValue(); | $old = $this->getOldValue(); | ||||
$new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_OWNERS: | case self::TYPE_OWNERS: | ||||
if (!is_array($old)) { | |||||
$old = array(); | |||||
} | |||||
if (!is_array($new)) { | |||||
$new = array(); | |||||
} | |||||
$add = array_diff($new, $old); | $add = array_diff($new, $old); | ||||
foreach ($add as $phid) { | foreach ($add as $phid) { | ||||
$phids[] = $phid; | $phids[] = $phid; | ||||
} | } | ||||
$rem = array_diff($old, $new); | $rem = array_diff($old, $new); | ||||
foreach ($rem as $phid) { | foreach ($rem as $phid) { | ||||
$phids[] = $phid; | $phids[] = $phid; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |