From 24ebac8ad7348e4808fb8e2bfc26c2fea696f675 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Fri, 16 Aug 2024 09:04:55 +0200 Subject: [PATCH] Remove unused shouldUse* functions from PhabricatorRepository Summary: Calls to private functions `PhabricatorRepository::shouldUseSSH()` and `PhabricatorRepository::shouldUseHTTP()` were removed in https://we.phorge.it/rP29d1115037b84454c4fd186c47f33f162cc337b9. Call to private function `PhabricatorRepository::shouldUseSVNProtocol()` was removed in https://we.phorge.it/rP575c01373ee77c12b06696b34cfdf43a2eb26c42. Test Plan: Grep the code; run static code analysis. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25786 --- .../storage/PhabricatorRepository.php | 56 ------------------- 1 file changed, 56 deletions(-) diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index b9aab043ad..5ffaad6282 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -1229,62 +1229,6 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO return $uri; } - - /** - * Determine if we should connect to the remote using SSH flags and - * credentials. - * - * @return bool True to use the SSH protocol. - * @task uri - */ - private function shouldUseSSH() { - if ($this->isHosted()) { - return false; - } - - $protocol = $this->getRemoteProtocol(); - if ($this->isSSHProtocol($protocol)) { - return true; - } - - return false; - } - - - /** - * Determine if we should connect to the remote using HTTP flags and - * credentials. - * - * @return bool True to use the HTTP protocol. - * @task uri - */ - private function shouldUseHTTP() { - if ($this->isHosted()) { - return false; - } - - $protocol = $this->getRemoteProtocol(); - return ($protocol == 'http' || $protocol == 'https'); - } - - - /** - * Determine if we should connect to the remote using SVN flags and - * credentials. - * - * @return bool True to use the SVN protocol. - * @task uri - */ - private function shouldUseSVNProtocol() { - if ($this->isHosted()) { - return false; - } - - $protocol = $this->getRemoteProtocol(); - return ($protocol == 'svn'); - } - - /** * Determine if a protocol is SSH or SSH-like. *