Passed
Push — master ( 0e53be...4a2921 )
by Roeland
25:30 queued 15:28
created
apps/encryption/templates/settings-personal.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,49 +7,49 @@  discard block
 block discarded – undo
7 7
 <form id="ocDefaultEncryptionModule" class="section">
8 8
 	<h2 data-anchor-name="basic-encryption-module"><?php p($l->t('Basic encryption module')); ?></h2>
9 9
 
10
-	<?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?>
10
+	<?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED): ?>
11 11
 
12 12
 	<?php p($l->t("Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.")); ?>
13 13
 
14
-	<?php elseif ( $_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED ): ?>
14
+	<?php elseif ($_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED): ?>
15 15
 		<p>
16 16
 			<a name="changePKPasswd" />
17 17
 			<label for="changePrivateKeyPasswd">
18
-				<em><?php p( $l->t( "Your private key password no longer matches your log-in password." ) ); ?></em>
18
+				<em><?php p($l->t("Your private key password no longer matches your log-in password.")); ?></em>
19 19
 			</label>
20 20
 			<br />
21
-			<?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?>
22
-			<?php if (  $_["recoveryEnabledForUser"] ):
23
-					p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
21
+			<?php p($l->t("Set your old private key password to your current log-in password:")); ?>
22
+			<?php if ($_["recoveryEnabledForUser"]):
23
+					p($l->t(" If you don't remember your old password you can ask your administrator to recover your files."));
24 24
 			endif; ?>
25 25
 			<br />
26 26
 			<input
27 27
 				type="password"
28 28
 				name="changePrivateKeyPassword"
29 29
 				id="oldPrivateKeyPassword" />
30
-			<label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label>
30
+			<label for="oldPrivateKeyPassword"><?php p($l->t("Old log-in password")); ?></label>
31 31
 			<br />
32 32
 			<input
33 33
 				type="password"
34 34
 				name="changePrivateKeyPassword"
35 35
 				id="newPrivateKeyPassword" />
36
-			<label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label>
36
+			<label for="newRecoveryPassword"><?php p($l->t("Current log-in password")); ?></label>
37 37
 			<br />
38 38
 			<button
39 39
 				type="button"
40 40
 				name="submitChangePrivateKeyPassword"
41
-				disabled><?php p($l->t( "Update Private Key Password" )); ?>
41
+				disabled><?php p($l->t("Update Private Key Password")); ?>
42 42
 			</button>
43 43
 			<span class="msg"></span>
44 44
 		</p>
45 45
 
46
-	<?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] &&  $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL ): ?>
46
+	<?php elseif ($_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL): ?>
47 47
 		<br />
48 48
 		<p id="userEnableRecovery">
49
-			<label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label>
49
+			<label for="userEnableRecovery"><?php p($l->t("Enable password recovery:")); ?></label>
50 50
 			<span class="msg"></span>
51 51
 			<br />
52
-			<em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em>
52
+			<em><?php p($l->t("Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")); ?></em>
53 53
 			<br />
54 54
 			<input
55 55
 			type="radio"
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 			id="userEnableRecoveryCheckbox"
58 58
 			name="userEnableRecovery"
59 59
 			value="1"
60
-			<?php echo ( $_["recoveryEnabledForUser"] ? 'checked="checked"' : '' ); ?> />
61
-			<label for="userEnableRecoveryCheckbox"><?php p( $l->t( "Enabled" ) ); ?></label>
60
+			<?php echo ($_["recoveryEnabledForUser"] ? 'checked="checked"' : ''); ?> />
61
+			<label for="userEnableRecoveryCheckbox"><?php p($l->t("Enabled")); ?></label>
62 62
 			<br />
63 63
 
64 64
 			<input
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 			id="userDisableRecoveryCheckbox"
68 68
 			name="userEnableRecovery"
69 69
 			value="0"
70
-			<?php echo ( $_["recoveryEnabledForUser"] === false ? 'checked="checked"' : '' ); ?> />
71
-			<label for="userDisableRecoveryCheckbox"><?php p( $l->t( "Disabled" ) ); ?></label>
70
+			<?php echo ($_["recoveryEnabledForUser"] === false ? 'checked="checked"' : ''); ?> />
71
+			<label for="userDisableRecoveryCheckbox"><?php p($l->t("Disabled")); ?></label>
72 72
 		</p>
73 73
 	<?php endif; ?>
74 74
 </form>
Please login to merge, or discard this patch.
core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
 		$appName = $input->getArgument('app');
61 61
 		$version = $input->getArgument('version');
62 62
 
63
-		if (!preg_match('/^\d{1,16}$/',$version)) {
63
+		if (!preg_match('/^\d{1,16}$/', $version)) {
64 64
 			$output->writeln('<error>The given version is invalid. Only 0-9 are allowed (max. 16 digits)</error>');
65 65
 			return 1;
66 66
 		}
67 67
 
68
-		$schemaFile = $this->appManager->getAppPath($appName) . '/appinfo/database.xml';
68
+		$schemaFile = $this->appManager->getAppPath($appName).'/appinfo/database.xml';
69 69
 		if (!file_exists($schemaFile)) {
70
-			$output->writeln('<error>App ' . $appName . ' does not have a database.xml file</error>');
70
+			$output->writeln('<error>App '.$appName.' does not have a database.xml file</error>');
71 71
 			return 2;
72 72
 		}
73 73
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		$ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output));
81 81
 
82 82
 		$date = date('YmdHis');
83
-		$path = $this->generateMigration($ms, 'Version' . $version . 'Date' . $date, $schemaBody);
83
+		$path = $this->generateMigration($ms, 'Version'.$version.'Date'.$date, $schemaBody);
84 84
 
85 85
 		$output->writeln("New migration class has been generated to <info>$path</info>");
86 86
 		return 0;
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/QueryBuilder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
 			$params = [];
192 192
 			foreach ($this->getParameters() as $placeholder => $value) {
193 193
 				if (is_array($value)) {
194
-					$params[] = $placeholder . ' => (\'' . implode('\', \'', $value) . '\')';
194
+					$params[] = $placeholder.' => (\''.implode('\', \'', $value).'\')';
195 195
 				} else {
196
-					$params[] = $placeholder . ' => \'' . $value . '\'';
196
+					$params[] = $placeholder.' => \''.$value.'\'';
197 197
 				}
198 198
 			}
199 199
 			if (empty($params)) {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 	public function selectAlias($select, $alias) {
411 411
 
412 412
 		$this->queryBuilder->addSelect(
413
-			$this->helper->quoteColumnName($select) . ' AS ' . $this->helper->quoteColumnName($alias)
413
+			$this->helper->quoteColumnName($select).' AS '.$this->helper->quoteColumnName($alias)
414 414
 		);
415 415
 
416 416
 		return $this;
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 	public function selectDistinct($select) {
433 433
 
434 434
 		$this->queryBuilder->addSelect(
435
-			'DISTINCT ' . $this->helper->quoteColumnName($select)
435
+			'DISTINCT '.$this->helper->quoteColumnName($select)
436 436
 		);
437 437
 
438 438
 		return $this;
@@ -1109,7 +1109,7 @@  discard block
 block discarded – undo
1109 1109
 	 * @return IParameter
1110 1110
 	 */
1111 1111
 	public function createParameter($name) {
1112
-		return new Parameter(':' . $name);
1112
+		return new Parameter(':'.$name);
1113 1113
 	}
1114 1114
 
1115 1115
 	/**
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
 			return $table;
1177 1177
 		}
1178 1178
 
1179
-		return '*PREFIX*' . $table;
1179
+		return '*PREFIX*'.$table;
1180 1180
 	}
1181 1181
 
1182 1182
 	/**
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
 			$tableAlias .= '.';
1192 1192
 		}
1193 1193
 
1194
-		return $this->helper->quoteColumnName($tableAlias . $column);
1194
+		return $this->helper->quoteColumnName($tableAlias.$column);
1195 1195
 	}
1196 1196
 
1197 1197
 	/**
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/QuoteHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,12 +70,12 @@
 block discarded – undo
70 70
 			list($alias, $columnName) = explode('.', $string, 2);
71 71
 
72 72
 			if ($columnName === '*') {
73
-				return '`' . $alias . '`.*';
73
+				return '`'.$alias.'`.*';
74 74
 			}
75 75
 
76
-			return '`' . $alias . '`.`' . $columnName . '`';
76
+			return '`'.$alias.'`.`'.$columnName.'`';
77 77
 		}
78 78
 
79
-		return '`' . $string . '`';
79
+		return '`'.$string.'`';
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.
apps/testing/lib/Controller/LockingController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	protected function getPath($user, $path) {
100 100
 		$node = $this->rootFolder->getUserFolder($user)->get($path);
101
-		return 'files/' . md5($node->getStorage()->getId() . '::' . trim($node->getInternalPath(), '/'));
101
+		return 'files/'.md5($node->getStorage()->getId().'::'.trim($node->getInternalPath(), '/'));
102 102
 	}
103 103
 
104 104
 	/**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 		try {
136 136
 			$lockingProvider->acquireLock($path, $type);
137
-			$this->config->setAppValue('testing', 'locking_' . $path, $type);
137
+			$this->config->setAppValue('testing', 'locking_'.$path, $type);
138 138
 			return new DataResponse();
139 139
 		} catch (LockedException $e) {
140 140
 			throw new OCSException('', Http::STATUS_LOCKED, $e);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
 		try {
163 163
 			$lockingProvider->changeLock($path, $type);
164
-			$this->config->setAppValue('testing', 'locking_' . $path, $type);
164
+			$this->config->setAppValue('testing', 'locking_'.$path, $type);
165 165
 			return new DataResponse();
166 166
 		} catch (LockedException $e) {
167 167
 			throw new OCSException('', Http::STATUS_LOCKED, $e);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
 		try {
190 190
 			$lockingProvider->releaseLock($path, $type);
191
-			$this->config->deleteAppValue('testing', 'locking_' . $path);
191
+			$this->config->deleteAppValue('testing', 'locking_'.$path);
192 192
 			return new DataResponse();
193 193
 		} catch (LockedException $e) {
194 194
 			throw new OCSException('', Http::STATUS_LOCKED, $e);
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 			if (strpos($lock, 'locking_') === 0) {
232 232
 				$path = substr($lock, strlen('locking_'));
233 233
 
234
-				if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int)$this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) {
234
+				if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) {
235 235
 					$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
236
-				} else if ($type === ILockingProvider::LOCK_SHARED && (int)$this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) {
236
+				} else if ($type === ILockingProvider::LOCK_SHARED && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) {
237 237
 					$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
238 238
 				} else {
239 239
 					$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
Please login to merge, or discard this patch.
lib/private/Archive/Archive.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @param string $source either a local file or string data
50 50
 	 * @return bool
51 51
 	 */
52
-	public abstract function addFile($path, $source='');
52
+	public abstract function addFile($path, $source = '');
53 53
 	/**
54 54
 	 * rename a file or folder in the archive
55 55
 	 * @param string $source
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	public function addRecursive($path, $source) {
128 128
 		$dh = opendir($source);
129
-		if(is_resource($dh)) {
129
+		if (is_resource($dh)) {
130 130
 			$this->addFolder($path);
131 131
 			while (($file = readdir($dh)) !== false) {
132
-				if($file === '.' || $file === '..') {
132
+				if ($file === '.' || $file === '..') {
133 133
 					continue;
134 134
 				}
135
-				if(is_dir($source.'/'.$file)) {
135
+				if (is_dir($source.'/'.$file)) {
136 136
 					$this->addRecursive($path.'/'.$file, $source.'/'.$file);
137
-				}else{
137
+				} else {
138 138
 					$this->addFile($path.'/'.$file, $source.'/'.$file);
139 139
 				}
140 140
 			}
Please login to merge, or discard this patch.
lib/private/Memcache/Memcached.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	public function get($key) {
100
-		$result = self::$cache->get($this->getNameSpace() . $key);
100
+		$result = self::$cache->get($this->getNameSpace().$key);
101 101
 		if ($result === false and self::$cache->getResultCode() == \Memcached::RES_NOTFOUND) {
102 102
 			return null;
103 103
 		} else {
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
 
108 108
 	public function set($key, $value, $ttl = 0) {
109 109
 		if ($ttl > 0) {
110
-			$result =  self::$cache->set($this->getNameSpace() . $key, $value, $ttl);
110
+			$result = self::$cache->set($this->getNameSpace().$key, $value, $ttl);
111 111
 		} else {
112
-			$result = self::$cache->set($this->getNameSpace() . $key, $value);
112
+			$result = self::$cache->set($this->getNameSpace().$key, $value);
113 113
 		}
114 114
 		if ($result !== true) {
115 115
 			$this->verifyReturnCode();
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
 	}
119 119
 
120 120
 	public function hasKey($key) {
121
-		self::$cache->get($this->getNameSpace() . $key);
121
+		self::$cache->get($this->getNameSpace().$key);
122 122
 		return self::$cache->getResultCode() === \Memcached::RES_SUCCESS;
123 123
 	}
124 124
 
125 125
 	public function remove($key) {
126
-		$result= self::$cache->delete($this->getNameSpace() . $key);
126
+		$result = self::$cache->delete($this->getNameSpace().$key);
127 127
 		if (self::$cache->getResultCode() !== \Memcached::RES_NOTFOUND) {
128 128
 			$this->verifyReturnCode();
129 129
 		}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	}
132 132
 
133 133
 	public function clear($prefix = '') {
134
-		$prefix = $this->getNameSpace() . $prefix;
134
+		$prefix = $this->getNameSpace().$prefix;
135 135
 		$allKeys = self::$cache->getAllKeys();
136 136
 		if ($allKeys === false) {
137 137
 			// newer Memcached doesn't like getAllKeys(), flush everything
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @throws \Exception
166 166
 	 */
167 167
 	public function add($key, $value, $ttl = 0) {
168
-		$result = self::$cache->add($this->getPrefix() . $key, $value, $ttl);
168
+		$result = self::$cache->add($this->getPrefix().$key, $value, $ttl);
169 169
 		if (self::$cache->getResultCode() !== \Memcached::RES_NOTSTORED) {
170 170
 			$this->verifyReturnCode();
171 171
 		}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function inc($key, $step = 1) {
183 183
 		$this->add($key, 0);
184
-		$result = self::$cache->increment($this->getPrefix() . $key, $step);
184
+		$result = self::$cache->increment($this->getPrefix().$key, $step);
185 185
 
186 186
 		if (self::$cache->getResultCode() !== \Memcached::RES_SUCCESS) {
187 187
 			return false;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	 * @return int | bool
199 199
 	 */
200 200
 	public function dec($key, $step = 1) {
201
-		$result = self::$cache->decrement($this->getPrefix() . $key, $step);
201
+		$result = self::$cache->decrement($this->getPrefix().$key, $step);
202 202
 
203 203
 		if (self::$cache->getResultCode() !== \Memcached::RES_SUCCESS) {
204 204
 			return false;
Please login to merge, or discard this patch.
apps/files_sharing/lib/Command/CleanupRemoteStorages.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 
61 61
 		$remoteStorages = $this->getRemoteStorages();
62 62
 
63
-		$output->writeln(count($remoteStorages) . ' remote storage(s) need(s) to be checked');
63
+		$output->writeln(count($remoteStorages).' remote storage(s) need(s) to be checked');
64 64
 
65 65
 		$remoteShareIds = $this->getRemoteShareIds();
66 66
 
67
-		$output->writeln(count($remoteShareIds) . ' remote share(s) exist');
67
+		$output->writeln(count($remoteShareIds).' remote share(s) exist');
68 68
 
69 69
 		foreach ($remoteShareIds as $id => $remoteShareId) {
70 70
 			if (isset($remoteStorages[$remoteShareId])) {
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
 			->where($queryBuilder->expr()->like(
143 143
 				'id',
144 144
 				// match all 'shared::' + 32 characters storages
145
-				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::') . str_repeat('_', 32)),
145
+				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::').str_repeat('_', 32)),
146 146
 				IQueryBuilder::PARAM_STR)
147 147
 			)
148 148
 			->andWhere($queryBuilder->expr()->notLike(
149 149
 				'id',
150 150
 				// but not the ones starting with a '/', they are for normal shares
151
-				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::/') . '%'),
151
+				$queryBuilder->createNamedParameter($this->connection->escapeLikeParameter('shared::/').'%'),
152 152
 				IQueryBuilder::PARAM_STR)
153 153
 			)->orderBy('numeric_id');
154 154
 		$query = $queryBuilder->execute();
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		$remoteShareIds = [];
173 173
 
174 174
 		while ($row = $query->fetch()) {
175
-			$remoteShareIds[$row['id']] = 'shared::' . md5($row['share_token'] . '@' . $row['remote']);
175
+			$remoteShareIds[$row['id']] = 'shared::'.md5($row['share_token'].'@'.$row['remote']);
176 176
 		}
177 177
 
178 178
 		return $remoteShareIds;
Please login to merge, or discard this patch.
lib/public/AppFramework/ApiController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function __construct($appName,
61 61
                                 IRequest $request,
62
-                                $corsMethods='PUT, POST, GET, DELETE, PATCH',
63
-                                $corsAllowedHeaders='Authorization, Content-Type, Accept',
64
-                                $corsMaxAge=1728000){
62
+                                $corsMethods = 'PUT, POST, GET, DELETE, PATCH',
63
+                                $corsAllowedHeaders = 'Authorization, Content-Type, Accept',
64
+                                $corsMaxAge = 1728000) {
65 65
         parent::__construct($appName, $request);
66 66
         $this->corsMethods = $corsMethods;
67 67
         $this->corsAllowedHeaders = $corsAllowedHeaders;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @since 7.0.0
80 80
      */
81 81
     public function preflightedCors() {
82
-        if(isset($this->request->server['HTTP_ORIGIN'])) {
82
+        if (isset($this->request->server['HTTP_ORIGIN'])) {
83 83
             $origin = $this->request->server['HTTP_ORIGIN'];
84 84
         } else {
85 85
             $origin = '*';
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $response = new Response();
89 89
         $response->addHeader('Access-Control-Allow-Origin', $origin);
90 90
         $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods);
91
-        $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge);
91
+        $response->addHeader('Access-Control-Max-Age', (string) $this->corsMaxAge);
92 92
         $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders);
93 93
         $response->addHeader('Access-Control-Allow-Credentials', 'false');
94 94
         return $response;
Please login to merge, or discard this patch.