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 PhabricatorRepositoryMaintenanceTransaction extends PhabricatorReposi..
Decoded Output download
<?php
final class PhabricatorRepositoryMaintenanceTransaction
extends PhabricatorRepositoryTransactionType {
const TRANSACTIONTYPE = 'maintenance';
public function generateOldValue($object) {
return $object->getReadOnlyMessage();
}
public function applyInternalEffects($object, $value) {
if ($value === null) {
$object
->setReadOnly(false)
->setReadOnlyMessage(null);
} else {
$object
->setReadOnly(true)
->setReadOnlyMessage($value);
}
}
public function getTitle() {
$old = $this->getOldValue();
$new = $this->getNewValue();
if (strlen($old) && !strlen($new)) {
return pht(
'%s took this repository out of maintenance mode.',
$this->renderAuthor());
} else if (!strlen($old) && strlen($new)) {
return pht(
'%s put this repository into maintenance mode.',
$this->renderAuthor());
} else {
return pht(
'%s updated the maintenance message for this repository.',
$this->renderAuthor());
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorRepositoryMaintenanceTransaction
extends PhabricatorRepositoryTransactionType {
const TRANSACTIONTYPE = 'maintenance';
public function generateOldValue($object) {
return $object->getReadOnlyMessage();
}
public function applyInternalEffects($object, $value) {
if ($value === null) {
$object
->setReadOnly(false)
->setReadOnlyMessage(null);
} else {
$object
->setReadOnly(true)
->setReadOnlyMessage($value);
}
}
public function getTitle() {
$old = $this->getOldValue();
$new = $this->getNewValue();
if (strlen($old) && !strlen($new)) {
return pht(
'%s took this repository out of maintenance mode.',
$this->renderAuthor());
} else if (!strlen($old) && strlen($new)) {
return pht(
'%s put this repository into maintenance mode.',
$this->renderAuthor());
} else {
return pht(
'%s updated the maintenance message for this repository.',
$this->renderAuthor());
}
}
}
Function Calls
None |
Stats
MD5 | 98b5462861b7bbaf698737faeb8071bf |
Eval Count | 0 |
Decode Time | 83 ms |