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 DiffusionCommitVerifyTransaction extends DiffusionCommitAuditTransact..

Decoded Output download

<?php

final class DiffusionCommitVerifyTransaction
  extends DiffusionCommitAuditTransaction {

  const TRANSACTIONTYPE = 'diffusion.commit.verify';
  const ACTIONKEY = 'verify';

  protected function getCommitActionLabel() {
    return pht('Request Verification');
  }

  protected function getCommitActionDescription() {
    return pht(
      'Auditors will be asked to verify that concerns have been addressed.');
  }

  protected function getCommitActionGroupKey() {
    return DiffusionCommitEditEngine::ACTIONGROUP_COMMIT;
  }

  public function getIcon() {
    return 'fa-refresh';
  }

  public function getColor() {
    return 'indigo';
  }

  protected function getCommitActionOrder() {
    return 600;
  }

  public function getActionName() {
    return pht('Requested Verification');
  }

  public function applyInternalEffects($object, $value) {
    $object->setAuditStatus(DiffusionCommitAuditStatus::NEEDS_VERIFICATION);
  }

  protected function validateAction($object, PhabricatorUser $viewer) {
    if (!$this->isViewerCommitAuthor($object, $viewer)) {
      throw new Exception(
        pht(
          'You can not request verification of this commit because you '.
          'are not the author.'));
    }

    if (!$object->isAuditStatusConcernRaised()) {
      throw new Exception(
        pht(
          'You can not request verification of this commit because no '.
          'auditors have raised concerns with it.'));
    }
  }

  public function getTitle() {
    return pht(
      '%s requested verification of this commit.',
      $this->renderAuthor());
  }

  public function getTitleForFeed() {
    return pht(
      '%s requested verification of %s.',
      $this->renderAuthor(),
      $this->renderObject());
  }

  public function getTransactionTypeForConduit($xaction) {
    return 'request-verification';
  }

  public function getFieldValuesForConduit($object, $data) {
    return array();
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DiffusionCommitVerifyTransaction
  extends DiffusionCommitAuditTransaction {

  const TRANSACTIONTYPE = 'diffusion.commit.verify';
  const ACTIONKEY = 'verify';

  protected function getCommitActionLabel() {
    return pht('Request Verification');
  }

  protected function getCommitActionDescription() {
    return pht(
      'Auditors will be asked to verify that concerns have been addressed.');
  }

  protected function getCommitActionGroupKey() {
    return DiffusionCommitEditEngine::ACTIONGROUP_COMMIT;
  }

  public function getIcon() {
    return 'fa-refresh';
  }

  public function getColor() {
    return 'indigo';
  }

  protected function getCommitActionOrder() {
    return 600;
  }

  public function getActionName() {
    return pht('Requested Verification');
  }

  public function applyInternalEffects($object, $value) {
    $object->setAuditStatus(DiffusionCommitAuditStatus::NEEDS_VERIFICATION);
  }

  protected function validateAction($object, PhabricatorUser $viewer) {
    if (!$this->isViewerCommitAuthor($object, $viewer)) {
      throw new Exception(
        pht(
          'You can not request verification of this commit because you '.
          'are not the author.'));
    }

    if (!$object->isAuditStatusConcernRaised()) {
      throw new Exception(
        pht(
          'You can not request verification of this commit because no '.
          'auditors have raised concerns with it.'));
    }
  }

  public function getTitle() {
    return pht(
      '%s requested verification of this commit.',
      $this->renderAuthor());
  }

  public function getTitleForFeed() {
    return pht(
      '%s requested verification of %s.',
      $this->renderAuthor(),
      $this->renderObject());
  }

  public function getTransactionTypeForConduit($xaction) {
    return 'request-verification';
  }

  public function getFieldValuesForConduit($object, $data) {
    return array();
  }

}

Function Calls

None

Variables

None

Stats

MD5 a235b875283d34c4b0d7ac73be7dac29
Eval Count 0
Decode Time 105 ms