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 PhabricatorProjectPHIDResolver extends PhabricatorPHIDResolver { p..

Decoded Output download

<?php

final class PhabricatorProjectPHIDResolver
  extends PhabricatorPHIDResolver {

  protected function getResolutionMap(array $names) {
    // This is a little awkward but we want to pick up the normalization
    // rules from the PHIDType. This flow could perhaps be made cleaner.

    foreach ($names as $key => $name) {
      $names[$key] = '#'.$name;
    }

    $query = id(new PhabricatorObjectQuery())
      ->setViewer($this->getViewer());

    $projects = id(new PhabricatorProjectProjectPHIDType())
      ->loadNamedObjects($query, $names);

    $results = array();
    foreach ($projects as $hashtag => $project) {
      $results[substr($hashtag, 1)] = $project->getPHID();
    }

    return $results;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorProjectPHIDResolver
  extends PhabricatorPHIDResolver {

  protected function getResolutionMap(array $names) {
    // This is a little awkward but we want to pick up the normalization
    // rules from the PHIDType. This flow could perhaps be made cleaner.

    foreach ($names as $key => $name) {
      $names[$key] = '#'.$name;
    }

    $query = id(new PhabricatorObjectQuery())
      ->setViewer($this->getViewer());

    $projects = id(new PhabricatorProjectProjectPHIDType())
      ->loadNamedObjects($query, $names);

    $results = array();
    foreach ($projects as $hashtag => $project) {
      $results[substr($hashtag, 1)] = $project->getPHID();
    }

    return $results;
  }

}

Function Calls

None

Variables

None

Stats

MD5 5fef89e6d85a950178c20fff98d25b23
Eval Count 0
Decode Time 97 ms