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 PhabricatorBadgesAwardTestDataGenerator extends PhabricatorTestDataGe..

Decoded Output download

<?php

final class PhabricatorBadgesAwardTestDataGenerator
  extends PhabricatorTestDataGenerator {

  const GENERATORKEY = 'badges.award';

  public function getGeneratorName() {
    return pht('Badges Award');
  }

  public function generateObject() {
    $author = $this->loadRandomUser();
    $recipient = $this->loadRandomUser();
    $badge_phid = $this->loadRandomPHID(new PhabricatorBadgesBadge());

    $xactions = array();

    $xactions[] = array(
      'type' => 'award',
      'value' => array($recipient->getPHID()),
    );

    $params = array(
      'transactions' => $xactions,
      'objectIdentifier' => $badge_phid,
    );

    $result = id(new ConduitCall('badge.edit', $params))
      ->setUser($author)
      ->execute();

    return $result['object']['phid'];
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorBadgesAwardTestDataGenerator
  extends PhabricatorTestDataGenerator {

  const GENERATORKEY = 'badges.award';

  public function getGeneratorName() {
    return pht('Badges Award');
  }

  public function generateObject() {
    $author = $this->loadRandomUser();
    $recipient = $this->loadRandomUser();
    $badge_phid = $this->loadRandomPHID(new PhabricatorBadgesBadge());

    $xactions = array();

    $xactions[] = array(
      'type' => 'award',
      'value' => array($recipient->getPHID()),
    );

    $params = array(
      'transactions' => $xactions,
      'objectIdentifier' => $badge_phid,
    );

    $result = id(new ConduitCall('badge.edit', $params))
      ->setUser($author)
      ->execute();

    return $result['object']['phid'];
  }

}

Function Calls

None

Variables

None

Stats

MD5 c6f7a0ef103e11edec75cbaff808efc9
Eval Count 0
Decode Time 77 ms