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 HeraldAnotherRuleField extends HeraldField { const FIELDCONST = 'rul..

Decoded Output download

<?php

final class HeraldAnotherRuleField extends HeraldField {

  const FIELDCONST = 'rule';

  public function getHeraldFieldName() {
    return pht('Another Herald rule');
  }

  public function getFieldGroupKey() {
    return HeraldBasicFieldGroup::FIELDGROUPKEY;
  }

  public function supportsObject($object) {
    return true;
  }

  public function getHeraldFieldValue($object) {
    return null;
  }

  public function getHeraldFieldConditions() {
    return array(
      HeraldAdapter::CONDITION_RULE,
      HeraldAdapter::CONDITION_NOT_RULE,
    );
  }

  public function getHeraldFieldValueType($condition) {
    // NOTE: This is a bit magical because we don't currently have a reasonable
    // way to populate it from here.
    return id(new HeraldSelectFieldValue())
      ->setKey(self::FIELDCONST)
      ->setOptions(array());
  }

  public function renderConditionValue(
    PhabricatorUser $viewer,
    $condition,
    $value) {

    $value = (array)$value;

    return $viewer->renderHandleList($value);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class HeraldAnotherRuleField extends HeraldField {

  const FIELDCONST = 'rule';

  public function getHeraldFieldName() {
    return pht('Another Herald rule');
  }

  public function getFieldGroupKey() {
    return HeraldBasicFieldGroup::FIELDGROUPKEY;
  }

  public function supportsObject($object) {
    return true;
  }

  public function getHeraldFieldValue($object) {
    return null;
  }

  public function getHeraldFieldConditions() {
    return array(
      HeraldAdapter::CONDITION_RULE,
      HeraldAdapter::CONDITION_NOT_RULE,
    );
  }

  public function getHeraldFieldValueType($condition) {
    // NOTE: This is a bit magical because we don't currently have a reasonable
    // way to populate it from here.
    return id(new HeraldSelectFieldValue())
      ->setKey(self::FIELDCONST)
      ->setOptions(array());
  }

  public function renderConditionValue(
    PhabricatorUser $viewer,
    $condition,
    $value) {

    $value = (array)$value;

    return $viewer->renderHandleList($value);
  }

}

Function Calls

None

Variables

None

Stats

MD5 39db81d0f68399862ae36648ca72afbe
Eval Count 0
Decode Time 93 ms