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 PhabricatorConpherenceRoomTestDataGenerator extends PhabricatorTestDa..

Decoded Output download

<?php

final class PhabricatorConpherenceRoomTestDataGenerator
  extends PhabricatorTestDataGenerator {

  const GENERATORKEY = 'conpherence';

  public function getGeneratorName() {
    return pht('Conpherence');
  }

  public function generateObject() {
    $author = $this->loadRandomUser();

    $name = $this->newRoomName();

    $participants = array();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();

    $rando_phids = array();
    $rando_phids[] = $author->getPHID();
    foreach ($participants as $actor) {
      $rando_phids[] = $actor->getPHID();
    }

    $xactions = array();

    $xactions[] = array(
      'type' => 'name',
      'value' => $name,
    );

    $xactions[] = array(
      'type' => 'participants.set',
      'value' => $rando_phids,
    );

    $xactions[] = array(
      'type' => 'view',
      'value' => 'users',
    );

    $xactions[] = array(
      'type' => 'edit',
      'value' => 'users',
    );

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

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

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

  protected function newRoomName() {
    $generator = new PhabricatorConpherenceRoomContextFreeGrammar();
    $name = $generator->generate();
    return $name;
  }



}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorConpherenceRoomTestDataGenerator
  extends PhabricatorTestDataGenerator {

  const GENERATORKEY = 'conpherence';

  public function getGeneratorName() {
    return pht('Conpherence');
  }

  public function generateObject() {
    $author = $this->loadRandomUser();

    $name = $this->newRoomName();

    $participants = array();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();
    $participants[] = $this->loadRandomUser();

    $rando_phids = array();
    $rando_phids[] = $author->getPHID();
    foreach ($participants as $actor) {
      $rando_phids[] = $actor->getPHID();
    }

    $xactions = array();

    $xactions[] = array(
      'type' => 'name',
      'value' => $name,
    );

    $xactions[] = array(
      'type' => 'participants.set',
      'value' => $rando_phids,
    );

    $xactions[] = array(
      'type' => 'view',
      'value' => 'users',
    );

    $xactions[] = array(
      'type' => 'edit',
      'value' => 'users',
    );

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

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

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

  protected function newRoomName() {
    $generator = new PhabricatorConpherenceRoomContextFreeGrammar();
    $name = $generator->generate();
    return $name;
  }



}

Function Calls

None

Variables

None

Stats

MD5 31996d00ca897cdbf16aeb3f47c7e9e0
Eval Count 0
Decode Time 103 ms