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 AlmanacSetPropertyEditType extends PhabricatorEditType { public fu..

Decoded Output download

<?php

final class AlmanacSetPropertyEditType
  extends PhabricatorEditType {

  public function generateTransactions(
    PhabricatorApplicationTransaction $template,
    array $spec) {

    $value = idx($spec, 'value');
    if (!is_array($value)) {
      throw new Exception(
        pht(
          'Transaction value when setting Almanac properties must be a map '.
          'with property names as keys.'));
    }

    $xactions = array();
    foreach ($value as $property_key => $property_value) {
      $xactions[] = $this->newTransaction($template)
        ->setMetadataValue('almanac.property', $property_key)
        ->setNewValue($property_value);
    }

    return $xactions;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class AlmanacSetPropertyEditType
  extends PhabricatorEditType {

  public function generateTransactions(
    PhabricatorApplicationTransaction $template,
    array $spec) {

    $value = idx($spec, 'value');
    if (!is_array($value)) {
      throw new Exception(
        pht(
          'Transaction value when setting Almanac properties must be a map '.
          'with property names as keys.'));
    }

    $xactions = array();
    foreach ($value as $property_key => $property_value) {
      $xactions[] = $this->newTransaction($template)
        ->setMetadataValue('almanac.property', $property_key)
        ->setNewValue($property_value);
    }

    return $xactions;
  }

}

Function Calls

None

Variables

None

Stats

MD5 9f0fcdeeb9a7e994cc8175b41a0b1190
Eval Count 0
Decode Time 75 ms