From 68c854b9673e0e51296daccfeb41884e79ebf77b Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 7 Oct 2013 12:52:01 -0700 Subject: [PATCH] Remove dead `rejectImpossiblePolicy()` method Summary: Ref T603. Apparently we made all policies possible at some point. Go us! This has no callsites. Test Plan: `grep`, notice it's a private method Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7259 --- .../policy/filter/PhabricatorPolicyFilter.php | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/applications/policy/filter/PhabricatorPolicyFilter.php b/src/applications/policy/filter/PhabricatorPolicyFilter.php index d831c4d462..2b386c265b 100644 --- a/src/applications/policy/filter/PhabricatorPolicyFilter.php +++ b/src/applications/policy/filter/PhabricatorPolicyFilter.php @@ -233,33 +233,6 @@ final class PhabricatorPolicyFilter { return false; } - private function rejectImpossiblePolicy( - PhabricatorPolicyInterface $object, - $policy, - $capability) { - - if (!$this->raisePolicyExceptions) { - return; - } - - switch ($capability) { - case PhabricatorPolicyCapability::CAN_VIEW: - $message = pht("This object has an impossible view policy."); - break; - case PhabricatorPolicyCapability::CAN_EDIT: - $message = pht("This object has an impossible edit policy."); - break; - case PhabricatorPolicyCapability::CAN_JOIN: - $message = pht("This object has an impossible join policy."); - break; - default: - $message = pht("This object has an impossible policy."); - break; - } - - throw new PhabricatorPolicyException($message); - } - public function rejectObject( PhabricatorPolicyInterface $object, $policy,