Code Duplication    Length = 6-6 lines in 2 locations

core/Command/Encryption/DecryptAll.php 1 location

@@ 88-93 (lines=6) @@
85
	/**
86
	 * Set maintenance mode and disable the trashbin app
87
	 */
88
	protected function forceMaintenanceAndTrashbin() {
89
		$this->wasTrashbinEnabled = $this->appManager->isEnabledForUser('files_trashbin');
90
		$this->wasMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false);
91
		$this->config->setSystemValue('maintenance', true);
92
		$this->appManager->disableApp('files_trashbin');
93
	}
94
95
	/**
96
	 * Reset the maintenance mode and re-enable the trashbin app

core/Command/Encryption/EncryptAll.php 1 location

@@ 77-82 (lines=6) @@
74
	/**
75
	 * Set maintenance mode and disable the trashbin app
76
	 */
77
	protected function forceMaintenanceAndTrashbin() {
78
		$this->wasTrashbinEnabled = $this->appManager->isEnabledForUser('files_trashbin');
79
		$this->wasMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false);
80
		$this->config->setSystemValue('maintenance', true);
81
		$this->appManager->disableApp('files_trashbin');
82
	}
83
84
	/**
85
	 * Reset the maintenance mode and re-enable the trashbin app