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 PhabricatorProjectsPolicyRule extends PhabricatorProjectsBasePolicyRu..

Decoded Output download

<?php

final class PhabricatorProjectsPolicyRule
  extends PhabricatorProjectsBasePolicyRule {

  public function getRuleDescription() {
    return pht('members of any project');
  }

  public function applyRule(
    PhabricatorUser $viewer,
    $value,
    PhabricatorPolicyInterface $object) {

    $memberships = $this->getMemberships($viewer->getPHID());
    foreach ($value as $project_phid) {
      if (isset($memberships[$project_phid])) {
        return true;
      }
    }

    return false;
  }

  public function getRuleOrder() {
    return 200;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorProjectsPolicyRule
  extends PhabricatorProjectsBasePolicyRule {

  public function getRuleDescription() {
    return pht('members of any project');
  }

  public function applyRule(
    PhabricatorUser $viewer,
    $value,
    PhabricatorPolicyInterface $object) {

    $memberships = $this->getMemberships($viewer->getPHID());
    foreach ($value as $project_phid) {
      if (isset($memberships[$project_phid])) {
        return true;
      }
    }

    return false;
  }

  public function getRuleOrder() {
    return 200;
  }

}

Function Calls

None

Variables

None

Stats

MD5 9e2f77f87a39fae38506246aabd9ec0e
Eval Count 0
Decode Time 91 ms