Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php final class PhabricatorRepositoryTrackOnlyTransaction extends PhabricatorReposito..
Decoded Output download
<?php
final class PhabricatorRepositoryTrackOnlyTransaction
extends PhabricatorRepositoryTransactionType {
const TRANSACTIONTYPE = 'repo:track-only';
public function generateOldValue($object) {
return $object->getTrackOnlyRules();
}
public function applyInternalEffects($object, $value) {
$object->setTrackOnlyRules($value);
}
public function getTitle() {
$old = $this->getOldValue();
$new = $this->getNewValue();
if (!$new) {
return pht(
'%s set this repository to track all branches.',
$this->renderAuthor());
} else if (!$old) {
return pht(
'%s set this repository to track branches: %s.',
$this->renderAuthor(),
$this->renderValue(implode(', ', $new)));
} else {
return pht(
'%s changed tracked branches from %s to %s.',
$this->renderAuthor(),
$this->renderValue(implode(', ', $old)),
$this->renderValue(implode(', ', $new)));
}
}
public function validateTransactions($object, array $xactions) {
return $this->validateRefList($object, $xactions);
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorRepositoryTrackOnlyTransaction
extends PhabricatorRepositoryTransactionType {
const TRANSACTIONTYPE = 'repo:track-only';
public function generateOldValue($object) {
return $object->getTrackOnlyRules();
}
public function applyInternalEffects($object, $value) {
$object->setTrackOnlyRules($value);
}
public function getTitle() {
$old = $this->getOldValue();
$new = $this->getNewValue();
if (!$new) {
return pht(
'%s set this repository to track all branches.',
$this->renderAuthor());
} else if (!$old) {
return pht(
'%s set this repository to track branches: %s.',
$this->renderAuthor(),
$this->renderValue(implode(', ', $new)));
} else {
return pht(
'%s changed tracked branches from %s to %s.',
$this->renderAuthor(),
$this->renderValue(implode(', ', $old)),
$this->renderValue(implode(', ', $new)));
}
}
public function validateTransactions($object, array $xactions) {
return $this->validateRefList($object, $xactions);
}
}
Function Calls
None |
Stats
MD5 | 6b4eee01b8f640cfdc6cdac591f35f3b |
Eval Count | 0 |
Decode Time | 81 ms |