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 PhabricatorProjectMilestoneTransaction extends PhabricatorProjectType..

Decoded Output download

<?php

final class PhabricatorProjectMilestoneTransaction
  extends PhabricatorProjectTypeTransaction {

  const TRANSACTIONTYPE = 'project:milestone';

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

  public function applyInternalEffects($object, $value) {
    $parent_phid = $value;
    $project = id(new PhabricatorProjectQuery())
      ->setViewer($this->getActor())
      ->withPHIDs(array($parent_phid))
      ->requireCapabilities(
        array(
          PhabricatorPolicyCapability::CAN_VIEW,
          PhabricatorPolicyCapability::CAN_EDIT,
        ))
      ->executeOne();

    $object->attachParentProject($project);

    $number = $object->getParentProject()->loadNextMilestoneNumber();
    $object->setMilestoneNumber($number);
    $object->setParentProjectPHID($value);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorProjectMilestoneTransaction
  extends PhabricatorProjectTypeTransaction {

  const TRANSACTIONTYPE = 'project:milestone';

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

  public function applyInternalEffects($object, $value) {
    $parent_phid = $value;
    $project = id(new PhabricatorProjectQuery())
      ->setViewer($this->getActor())
      ->withPHIDs(array($parent_phid))
      ->requireCapabilities(
        array(
          PhabricatorPolicyCapability::CAN_VIEW,
          PhabricatorPolicyCapability::CAN_EDIT,
        ))
      ->executeOne();

    $object->attachParentProject($project);

    $number = $object->getParentProject()->loadNextMilestoneNumber();
    $object->setMilestoneNumber($number);
    $object->setParentProjectPHID($value);
  }

}

Function Calls

None

Variables

None

Stats

MD5 73d2a7cc8b8911616e0fc10d39d091ea
Eval Count 0
Decode Time 88 ms