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

Decoded Output download

<?php

final class HeraldContentSourceField extends HeraldField {

  const FIELDCONST = 'contentsource';

  public function getHeraldFieldName() {
    return pht('Content source');
  }

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

  public function getHeraldFieldValue($object) {
    return $this->getAdapter()->getContentSource()->getSource();
  }

  public function getHeraldFieldConditions() {
    return array(
      HeraldAdapter::CONDITION_IS,
      HeraldAdapter::CONDITION_IS_NOT,
    );
  }

  public function getHeraldFieldValueType($condition) {
    $map = PhabricatorContentSource::getAllContentSources();
    $map = mpull($map, 'getSourceName');
    asort($map);

    return id(new HeraldSelectFieldValue())
      ->setKey(self::FIELDCONST)
      ->setDefault(PhabricatorWebContentSource::SOURCECONST)
      ->setOptions($map);
  }

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

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class HeraldContentSourceField extends HeraldField {

  const FIELDCONST = 'contentsource';

  public function getHeraldFieldName() {
    return pht('Content source');
  }

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

  public function getHeraldFieldValue($object) {
    return $this->getAdapter()->getContentSource()->getSource();
  }

  public function getHeraldFieldConditions() {
    return array(
      HeraldAdapter::CONDITION_IS,
      HeraldAdapter::CONDITION_IS_NOT,
    );
  }

  public function getHeraldFieldValueType($condition) {
    $map = PhabricatorContentSource::getAllContentSources();
    $map = mpull($map, 'getSourceName');
    asort($map);

    return id(new HeraldSelectFieldValue())
      ->setKey(self::FIELDCONST)
      ->setDefault(PhabricatorWebContentSource::SOURCECONST)
      ->setOptions($map);
  }

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

}

Function Calls

None

Variables

None

Stats

MD5 2469d9c6fda650c72f64686aab916568
Eval Count 0
Decode Time 87 ms