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 DifferentialReviewersSearchEngineAttachment extends PhabricatorSearch..

Decoded Output download

<?php

final class DifferentialReviewersSearchEngineAttachment
  extends PhabricatorSearchEngineAttachment {

  public function getAttachmentName() {
    return pht('Differential Reviewers');
  }

  public function getAttachmentDescription() {
    return pht('Get the reviewers for each revision.');
  }

  public function willLoadAttachmentData($query, $spec) {
    $query->needReviewers(true);
  }

  public function getAttachmentForObject($object, $data, $spec) {
    $reviewers = $object->getReviewers();

    $status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING;

    $list = array();
    foreach ($reviewers as $reviewer) {
      $status = $reviewer->getReviewerStatus();
      $is_blocking = ($status == $status_blocking);

      $list[] = array(
        'reviewerPHID' => $reviewer->getReviewerPHID(),
        'status' => $status,
        'isBlocking' => $is_blocking,
        'actorPHID' => $reviewer->getLastActorPHID(),
      );
    }

    return array(
      'reviewers' => $list,
    );
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DifferentialReviewersSearchEngineAttachment
  extends PhabricatorSearchEngineAttachment {

  public function getAttachmentName() {
    return pht('Differential Reviewers');
  }

  public function getAttachmentDescription() {
    return pht('Get the reviewers for each revision.');
  }

  public function willLoadAttachmentData($query, $spec) {
    $query->needReviewers(true);
  }

  public function getAttachmentForObject($object, $data, $spec) {
    $reviewers = $object->getReviewers();

    $status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING;

    $list = array();
    foreach ($reviewers as $reviewer) {
      $status = $reviewer->getReviewerStatus();
      $is_blocking = ($status == $status_blocking);

      $list[] = array(
        'reviewerPHID' => $reviewer->getReviewerPHID(),
        'status' => $status,
        'isBlocking' => $is_blocking,
        'actorPHID' => $reviewer->getLastActorPHID(),
      );
    }

    return array(
      'reviewers' => $list,
    );
  }

}

Function Calls

None

Variables

None

Stats

MD5 57459763602bb21a9838a1cf512c5af6
Eval Count 0
Decode Time 75 ms