protected function getCustomTransactionOldValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction) { switch ($xaction->getTransactionType()) { case PassphraseCredentialTransaction::TYPE_NAME: if ($this->getIsNewObject()) { return null; } return $object->getName(); case PassphraseCredentialTransaction::TYPE_DESCRIPTION: return $object->getDescription(); case PassphraseCredentialTransaction::TYPE_USERNAME: return $object->getUsername(); case PassphraseCredentialTransaction::TYPE_SECRET_ID: return $object->getSecretID(); case PassphraseCredentialTransaction::TYPE_DESTROY: return (int) $object->getIsDestroyed(); case PassphraseCredentialTransaction::TYPE_LOCK: return (int) $object->getIsLocked(); case PassphraseCredentialTransaction::TYPE_CONDUIT: return (int) $object->getAllowConduit(); case PassphraseCredentialTransaction::TYPE_LOOKEDATSECRET: return null; } return parent::getCustomTransactionOldValue($object, $xaction); }
protected function getCustomTransactionOldValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction) { switch ($xaction->getTransactionType()) { case AlmanacServiceTransaction::TYPE_NAME: return $object->getName(); case AlmanacServiceTransaction::TYPE_LOCK: return (bool) $object->getIsLocked(); } return parent::getCustomTransactionOldValue($object, $xaction); }