Code Duplication    Length = 5-11 lines in 3 locations

lib/private/Encryption/DecryptAll.php 2 locations

@@ 101-105 (lines=5) @@
98
		}
99
100
		$this->output->writeln('prepare encryption modules...');
101
		if (\OC::$server->getAppConfig()->getValue('encryption', 'useMasterKey', '0') !== '0') {
102
			if ($this->prepareEncryptionModules($user) === false) {
103
				return false;
104
			}
105
		}
106
		$this->output->writeln(' done.');
107
108
		$this->decryptAllUsersFiles($user);
@@ 170-174 (lines=5) @@
167
				return false;
168
			}
169
			$this->userManager->callForSeenUsers(function (IUser $user) use ($progress, &$userNo, $numberOfUsers) {
170
				if (\OC::$server->getAppConfig()->getValue('encryption', 'userSpecificKey', '0') !== '0') {
171
					if ($this->prepareEncryptionModules($user->getUID()) === false) {
172
						return false;
173
					}
174
				}
175
				$this->decryptUsersFiles(
176
					$user->getUID(),
177
					$progress,

apps/files/lib/Command/TransferOwnership.php 1 location

@@ 222-232 (lines=11) @@
219
					}
220
					$progress->advance();
221
					$this->filesExist = true;
222
					if ($fileInfo->isEncrypted()) {
223
						if (\OC::$server->getAppConfig()->getValue('encryption', 'useMasterKey', 0) !== 0) {
224
							/**
225
							 * We are not going to add this to encryptedFiles array.
226
							 * Because its encrypted with masterKey and hence it doesn't
227
							 * require user's specific password.
228
							 */
229
							return true;
230
						}
231
						$this->encryptedFiles[] = $fileInfo;
232
					}
233
					return true;
234
				});
235
		$progress->finish();