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 DiffusionPreCommitContentAuthorProjectsHeraldField extends DiffusionP..
Decoded Output download
<?php
final class DiffusionPreCommitContentAuthorProjectsHeraldField
extends DiffusionPreCommitContentHeraldField {
const FIELDCONST = 'diffusion.pre.commit.author.projects';
public function getHeraldFieldName() {
return pht("Author's projects");
}
public function getHeraldFieldValue($object) {
$adapter = $this->getAdapter();
$viewer = $adapter->getViewer();
$author_phid = $adapter->getAuthorPHID();
if (!$author_phid) {
return array();
}
$projects = id(new PhabricatorProjectQuery())
->setViewer($viewer)
->withMemberPHIDs(array($author_phid))
->execute();
return mpull($projects, 'getPHID');
}
protected function getHeraldFieldStandardType() {
return self::STANDARD_PHID_LIST;
}
protected function getDatasource() {
return new PhabricatorProjectDatasource();
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class DiffusionPreCommitContentAuthorProjectsHeraldField
extends DiffusionPreCommitContentHeraldField {
const FIELDCONST = 'diffusion.pre.commit.author.projects';
public function getHeraldFieldName() {
return pht("Author's projects");
}
public function getHeraldFieldValue($object) {
$adapter = $this->getAdapter();
$viewer = $adapter->getViewer();
$author_phid = $adapter->getAuthorPHID();
if (!$author_phid) {
return array();
}
$projects = id(new PhabricatorProjectQuery())
->setViewer($viewer)
->withMemberPHIDs(array($author_phid))
->execute();
return mpull($projects, 'getPHID');
}
protected function getHeraldFieldStandardType() {
return self::STANDARD_PHID_LIST;
}
protected function getDatasource() {
return new PhabricatorProjectDatasource();
}
}
Function Calls
None |
Stats
MD5 | 8c63e24a3122b517fbd90d0ea2594688 |
Eval Count | 0 |
Decode Time | 92 ms |