Failed Conditions
Pull Request — master (#160)
by Sander
02:33
created
lib/Service/EncryptService.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		$setting = $settings->getAppSetting('server_side_encryption');
104 104
 		$this->cipher = $setting['cipher'];
105 105
 		$this->mode = $setting['mode'];
106
-		$this->rounds = (int)100;
106
+		$this->rounds = (int) 100;
107 107
 		$this->server_key = \OC::$server->getConfig()->getSystemValue('passwordsalt', '');
108 108
 	}
109 109
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 	 * @return File|array
363 363
 	 * @throws \Exception
364 364
 	 */
365
-	private function handleFile($file, $op){
365
+	private function handleFile($file, $op) {
366 366
 		$service_function = ($op === 'encrypt') ? 'encrypt' : 'decrypt';
367 367
 		if ($file instanceof File) {
368 368
 			$userSuppliedKey = $file->getSize();
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -271,7 +271,9 @@  discard block
 block discarded – undo
271 271
 	protected function unpad($data) {
272 272
 		$length = $this->getKeySize();
273 273
 		$last = ord($data[strlen($data) - 1]);
274
-		if ($last > $length) return false;
274
+		if ($last > $length) {
275
+			return false;
276
+		}
275 277
 		if (substr($data, -1 * $last) !== str_repeat(chr($last), $last)) {
276 278
 			return false;
277 279
 		}
@@ -362,7 +364,7 @@  discard block
 block discarded – undo
362 364
 	 * @return File|array
363 365
 	 * @throws \Exception
364 366
 	 */
365
-	private function handleFile($file, $op){
367
+	private function handleFile($file, $op) {
366 368
 		$service_function = ($op === 'encrypt') ? 'encrypt' : 'decrypt';
367 369
 		if ($file instanceof File) {
368 370
 			$userSuppliedKey = $file->getSize();
Please login to merge, or discard this patch.
migration/serversideencryption.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
 			$revision->setUserId($_revision['user_id']);
98 98
 			$revision->setCreated($_revision['created']);
99 99
 			$revision->setEditedBy($_revision['edited_by']);
100
-			$revision->setCredentialData( $_revision['credential_data']);
100
+			$revision->setCredentialData($_revision['credential_data']);
101 101
 			$this->revisionService->updateRevision($revision);
102 102
 		}
103 103
 	}
Please login to merge, or discard this patch.
templates/part.admin.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 		<h2><?php p($l->t('Passman Settings')); ?></h2>
32 32
 		<?php
33 33
 		if ($checkVersion) {
34
-			p($l->t('Github version:'). ' '. $githubVersion);
34
+			p($l->t('Github version:') . ' ' . $githubVersion);
35 35
 			print '<br />';
36 36
 		} ?>
37 37
 		Local version: <?php p($localVersion); ?><br/>
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 			<label for="server_side_encryption">Server side encryption method:</label>
106 106
 			<select name="server_side_encryption2" id="server_side_encryption2">
107 107
 				<?php
108
-					foreach ($ciphers as $cipher){
109
-						print '<option value="'. $cipher .'">'. $cipher .'</option>';
108
+					foreach ($ciphers as $cipher) {
109
+						print '<option value="' . $cipher . '">' . $cipher . '</option>';
110 110
 					}
111 111
 				?>
112 112
 			</select> (Not working atm. OpenSSL has no equivalent of <code>mcrypt_get_key_size()</code>)
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 			<label for="server_side_encryption">Server side encryption method:</label>
106 106
 			<select name="server_side_encryption2" id="server_side_encryption2">
107 107
 				<?php
108
-					foreach ($ciphers as $cipher){
108
+					foreach ($ciphers as $cipher) {
109 109
 						print '<option value="'. $cipher .'">'. $cipher .'</option>';
110 110
 					}
111 111
 				?>
Please login to merge, or discard this patch.