Promote some constructors

This commit is contained in:
Dylan K. Taylor
2022-05-17 22:34:58 +01:00
parent 8e767da29e
commit d4b7f66e15
30 changed files with 144 additions and 218 deletions

View File

@ -32,17 +32,14 @@ use function json_decode;
class UpdateCheckTask extends AsyncTask{
private const TLS_KEY_UPDATER = "updater";
/** @var string */
private $endpoint;
/** @var string */
private $channel;
/** @var string */
private $error = "Unknown error";
private string $error = "Unknown error";
public function __construct(UpdateChecker $updater, string $endpoint, string $channel){
public function __construct(
UpdateChecker $updater,
private string $endpoint,
private string $channel
){
$this->storeLocal(self::TLS_KEY_UPDATER, $updater);
$this->endpoint = $endpoint;
$this->channel = $channel;
}
public function onRun() : void{