diff --git a/phpmyfaq/src/phpMyFAQ/Setup/Installer.php b/phpmyfaq/src/phpMyFAQ/Setup/Installer.php index bc89b196c2..464d7ad9b5 100644 --- a/phpmyfaq/src/phpMyFAQ/Setup/Installer.php +++ b/phpmyfaq/src/phpMyFAQ/Setup/Installer.php @@ -578,7 +578,7 @@ class Installer extends Setup * * @throws \Exception */ - public function __construct(private System $system) + public function __construct(private readonly System $system) { parent::__construct(); diff --git a/phpmyfaq/src/phpMyFAQ/Setup/Update.php b/phpmyfaq/src/phpMyFAQ/Setup/Update.php index ec8ceb63da..779bb505d7 100644 --- a/phpmyfaq/src/phpMyFAQ/Setup/Update.php +++ b/phpmyfaq/src/phpMyFAQ/Setup/Update.php @@ -153,11 +153,6 @@ public function optimizeTables(): void } } - public function setDryRun(bool $dryRun): void - { - $this->dryRun = $dryRun; - } - /** * @throws Exception */ diff --git a/phpmyfaq/src/phpMyFAQ/Setup/Upgrade.php b/phpmyfaq/src/phpMyFAQ/Setup/Upgrade.php index e7ffa001a6..0b92229a22 100644 --- a/phpmyfaq/src/phpMyFAQ/Setup/Upgrade.php +++ b/phpmyfaq/src/phpMyFAQ/Setup/Upgrade.php @@ -46,8 +46,6 @@ class Upgrade extends Setup private bool $isNightly; - private bool $isMaintenanceEnabled = false; - public function __construct(protected System $system, private readonly Configuration $configuration) { parent::__construct($this->system); @@ -151,7 +149,7 @@ public function downloadPackage(string $version): string /** * Method to verify the downloaded phpMyFAQ package * - * @param string $path | Path to zip file + * @param string $path | Path to a zip file * @param string $version | Version to verify * @throws TransportExceptionInterface|ClientExceptionInterface|RedirectionExceptionInterface|ServerExceptionInterface|JsonException */ @@ -255,26 +253,6 @@ public function createTemporaryBackup(string $backupName, callable $progressCall return file_exists($outputZipFile); } - /** - * Method to delete the temporary created backup. - * - * @param string $backupName | Name of the created backup - */ - public function deleteTemporaryBackup(string $backupName): bool - { - if (is_file($this->upgradeDirectory . DIRECTORY_SEPARATOR . $backupName)) { - return unlink($this->upgradeDirectory . DIRECTORY_SEPARATOR . $backupName); - } - return false; - } - - /** - * Method to restore from the temporary backup - */ - public function restoreTemporaryBackup() - { - } - /** * Method to install the package */ @@ -372,11 +350,6 @@ public function getFilename(string $version): string return sprintf(self::PHPMYFAQ_FILENAME, $version); } - public function getUpgradeDirectory(): string - { - return $this->upgradeDirectory; - } - public function setUpgradeDirectory(string $upgradeDirectory): void { $this->upgradeDirectory = $upgradeDirectory; @@ -394,14 +367,6 @@ public function setIsNightly(bool $isNightly): void public function isMaintenanceEnabled(): bool { - return $this->isMaintenanceEnabled = $this->configuration->get('main.maintenanceMode'); - } - - public function setIsMaintenanceEnabled(bool $isMaintenanceEnabled): Upgrade - { - $this->isMaintenanceEnabled = $isMaintenanceEnabled; - $this->configuration->set('main.maintenanceMode', $isMaintenanceEnabled); - - return $this; + return $this->configuration->get('main.maintenanceMode'); } }