Rename AutoUpdater -> UpdateChecker

This commit is contained in:
Dylan K. Taylor
2021-08-20 19:54:08 +01:00
parent 17c7e25346
commit d488c25a1a
5 changed files with 17 additions and 17 deletions

View File

@ -39,7 +39,7 @@ class UpdateCheckTask extends AsyncTask{
/** @var string */
private $error = "Unknown error";
public function __construct(AutoUpdater $updater, string $endpoint, string $channel){
public function __construct(UpdateChecker $updater, string $endpoint, string $channel){
$this->storeLocal(self::TLS_KEY_UPDATER, $updater);
$this->endpoint = $endpoint;
$this->channel = $channel;
@ -74,7 +74,7 @@ class UpdateCheckTask extends AsyncTask{
}
public function onCompletion() : void{
/** @var AutoUpdater $updater */
/** @var UpdateChecker $updater */
$updater = $this->fetchLocal(self::TLS_KEY_UPDATER);
if($this->hasResult()){
/** @var UpdateInfo $response */

View File

@ -34,7 +34,7 @@ use function strlen;
use function strtolower;
use function ucfirst;
class AutoUpdater{
class UpdateChecker{
/** @var Server */
protected $server;
@ -50,7 +50,7 @@ class AutoUpdater{
public function __construct(Server $server, string $endpoint){
$this->server = $server;
$this->logger = new \PrefixedLogger($server->getLogger(), "Auto Updater");
$this->logger = new \PrefixedLogger($server->getLogger(), "Update Checker");
$this->endpoint = "http://$endpoint/api/";
if($server->getConfigGroup()->getPropertyBool("auto-updater.enabled", true)){
@ -121,7 +121,7 @@ class AutoUpdater{
* @param string[] $lines
*/
protected function printConsoleMessage(array $lines, string $logLevel = \LogLevel::INFO) : void{
$title = $this->server->getName() . ' Auto Updater';
$title = $this->server->getName() . ' Update Checker';
$this->logger->log($logLevel, sprintf('----- %s -----', $title));
foreach($lines as $line){
$this->logger->log($logLevel, $line);