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 DiffusionPreCommitRefTypeHeraldField extends DiffusionPreCommitRefHer..

Decoded Output download

<?php

final class DiffusionPreCommitRefTypeHeraldField
  extends DiffusionPreCommitRefHeraldField {

  const FIELDCONST = 'diffusion.pre.ref.type';

  public function getHeraldFieldName() {
    return pht('Ref type');
  }

  public function getHeraldFieldValue($object) {
    return $object->getRefType();
  }

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

  public function getHeraldFieldValueType($condition) {
    $types = array(
      PhabricatorRepositoryPushLog::REFTYPE_BRANCH => pht('branch (git/hg)'),
      PhabricatorRepositoryPushLog::REFTYPE_TAG => pht('tag (git)'),
      PhabricatorRepositoryPushLog::REFTYPE_REF => pht('ref (git)'),
      PhabricatorRepositoryPushLog::REFTYPE_BOOKMARK => pht('bookmark (hg)'),
    );

    return id(new HeraldSelectFieldValue())
      ->setKey(self::FIELDCONST)
      ->setOptions($types)
      ->setDefault(PhabricatorRepositoryPushLog::REFTYPE_BRANCH);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DiffusionPreCommitRefTypeHeraldField
  extends DiffusionPreCommitRefHeraldField {

  const FIELDCONST = 'diffusion.pre.ref.type';

  public function getHeraldFieldName() {
    return pht('Ref type');
  }

  public function getHeraldFieldValue($object) {
    return $object->getRefType();
  }

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

  public function getHeraldFieldValueType($condition) {
    $types = array(
      PhabricatorRepositoryPushLog::REFTYPE_BRANCH => pht('branch (git/hg)'),
      PhabricatorRepositoryPushLog::REFTYPE_TAG => pht('tag (git)'),
      PhabricatorRepositoryPushLog::REFTYPE_REF => pht('ref (git)'),
      PhabricatorRepositoryPushLog::REFTYPE_BOOKMARK => pht('bookmark (hg)'),
    );

    return id(new HeraldSelectFieldValue())
      ->setKey(self::FIELDCONST)
      ->setOptions($types)
      ->setDefault(PhabricatorRepositoryPushLog::REFTYPE_BRANCH);
  }

}

Function Calls

None

Variables

None

Stats

MD5 45d85563259d7c65332d5982a60221f6
Eval Count 0
Decode Time 105 ms