From 62dfcd1e552fefff334dfc0aa0a039117990f063 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Fri, 16 Jan 2015 06:59:28 +1100 Subject: [PATCH] Fix the visibility of `PhutilDaemon::run` methods Summary: Ref T6822. This method is only called from `PhutilDaemon::execute()` and can be made `protected`. Test Plan: See D11404. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11405 --- src/applications/fact/daemon/PhabricatorFactDaemon.php | 2 +- .../repository/daemon/PhabricatorRepositoryPullLocalDaemon.php | 2 +- src/infrastructure/daemon/bot/PhabricatorBot.php | 2 +- .../garbagecollector/PhabricatorGarbageCollectorDaemon.php | 2 +- .../daemon/workers/PhabricatorTaskmasterDaemon.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/applications/fact/daemon/PhabricatorFactDaemon.php b/src/applications/fact/daemon/PhabricatorFactDaemon.php index 4cce5504f2..130bdcde17 100644 --- a/src/applications/fact/daemon/PhabricatorFactDaemon.php +++ b/src/applications/fact/daemon/PhabricatorFactDaemon.php @@ -6,7 +6,7 @@ final class PhabricatorFactDaemon extends PhabricatorDaemon { const RAW_FACT_BUFFER_LIMIT = 128; - public function run() { + protected function run() { $this->setEngines(PhabricatorFactEngine::loadAllEngines()); while (!$this->shouldExit()) { $iterators = $this->getAllApplicationIterators(); diff --git a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php index 1cac11c74d..db341f0f13 100644 --- a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php +++ b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php @@ -34,7 +34,7 @@ final class PhabricatorRepositoryPullLocalDaemon /** * @task pull */ - public function run() { + protected function run() { $argv = $this->getArgv(); array_unshift($argv, __CLASS__); $args = new PhutilArgumentParser($argv); diff --git a/src/infrastructure/daemon/bot/PhabricatorBot.php b/src/infrastructure/daemon/bot/PhabricatorBot.php index 667c90f4f0..6a453e1b0f 100644 --- a/src/infrastructure/daemon/bot/PhabricatorBot.php +++ b/src/infrastructure/daemon/bot/PhabricatorBot.php @@ -16,7 +16,7 @@ final class PhabricatorBot extends PhabricatorDaemon { private $config; private $pollFrequency; - public function run() { + protected function run() { $argv = $this->getArgv(); if (count($argv) !== 1) { throw new Exception('usage: PhabricatorBot '); diff --git a/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollectorDaemon.php b/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollectorDaemon.php index 5dd1f69ac3..105baaaf54 100644 --- a/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollectorDaemon.php +++ b/src/infrastructure/daemon/garbagecollector/PhabricatorGarbageCollectorDaemon.php @@ -6,7 +6,7 @@ */ final class PhabricatorGarbageCollectorDaemon extends PhabricatorDaemon { - public function run() { + protected function run() { $collectors = id(new PhutilSymbolLoader()) ->setAncestorClass('PhabricatorGarbageCollector') ->loadObjects(); diff --git a/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php b/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php index 2705af4b51..e8f7539dc4 100644 --- a/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php +++ b/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php @@ -2,7 +2,7 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon { - public function run() { + protected function run() { $sleep = 0; do { $tasks = id(new PhabricatorWorkerLeaseQuery())