Completed
Pull Request — master (#9488)
by John
26:02 queued 01:01
created
lib/private/DB/Connection.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			return parent::connect();
59 59
 		} catch (DBALException $e) {
60 60
 			// throw a new exception to prevent leaking info from the stacktrace
61
-			throw new DBALException('Failed to connect to the database: ' . $e->getMessage(), $e->getCode());
61
+			throw new DBALException('Failed to connect to the database: '.$e->getMessage(), $e->getCode());
62 62
 		}
63 63
 	}
64 64
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		// 0 is the method where we use `getCallerBacktrace`
111 111
 		// 1 is the target method which uses the method we want to log
112 112
 		if (isset($traces[1])) {
113
-			return $traces[1]['file'] . ':' . $traces[1]['line'];
113
+			return $traces[1]['file'].':'.$traces[1]['line'];
114 114
 		}
115 115
 
116 116
 		return '';
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * @param int $offset
157 157
 	 * @return \Doctrine\DBAL\Driver\Statement The prepared statement.
158 158
 	 */
159
-	public function prepare( $statement, $limit=null, $offset=null ) {
159
+	public function prepare($statement, $limit = null, $offset = null) {
160 160
 		if ($limit === -1) {
161 161
 			$limit = null;
162 162
 		}
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 			throw new \BadMethodCallException('Can not lock a new table until the previous lock is released.');
322 322
 		}
323 323
 
324
-		$tableName = $this->tablePrefix . $tableName;
324
+		$tableName = $this->tablePrefix.$tableName;
325 325
 		$this->lockedTable = $tableName;
326 326
 		$this->adapter->lockTable($tableName);
327 327
 	}
@@ -342,11 +342,11 @@  discard block
 block discarded – undo
342 342
 	 * @return string
343 343
 	 */
344 344
 	public function getError() {
345
-		$msg = $this->errorCode() . ': ';
345
+		$msg = $this->errorCode().': ';
346 346
 		$errorInfo = $this->errorInfo();
347 347
 		if (is_array($errorInfo)) {
348
-			$msg .= 'SQLSTATE = '.$errorInfo[0] . ', ';
349
-			$msg .= 'Driver Code = '.$errorInfo[1] . ', ';
348
+			$msg .= 'SQLSTATE = '.$errorInfo[0].', ';
349
+			$msg .= 'Driver Code = '.$errorInfo[1].', ';
350 350
 			$msg .= 'Driver Message = '.$errorInfo[2];
351 351
 		}
352 352
 		return $msg;
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
 	 * @param string $table table name without the prefix
359 359
 	 */
360 360
 	public function dropTable($table) {
361
-		$table = $this->tablePrefix . trim($table);
361
+		$table = $this->tablePrefix.trim($table);
362 362
 		$schema = $this->getSchemaManager();
363
-		if($schema->tablesExist(array($table))) {
363
+		if ($schema->tablesExist(array($table))) {
364 364
 			$schema->dropTable($table);
365 365
 		}
366 366
 	}
@@ -371,8 +371,8 @@  discard block
 block discarded – undo
371 371
 	 * @param string $table table name without the prefix
372 372
 	 * @return bool
373 373
 	 */
374
-	public function tableExists($table){
375
-		$table = $this->tablePrefix . trim($table);
374
+	public function tableExists($table) {
375
+		$table = $this->tablePrefix.trim($table);
376 376
 		$schema = $this->getSchemaManager();
377 377
 		return $schema->tablesExist(array($table));
378 378
 	}
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 	 * @return string
384 384
 	 */
385 385
 	protected function replaceTablePrefix($statement) {
386
-		return str_replace( '*PREFIX*', $this->tablePrefix, $statement );
386
+		return str_replace('*PREFIX*', $this->tablePrefix, $statement);
387 387
 	}
388 388
 
389 389
 	/**
Please login to merge, or discard this patch.
lib/private/Diagnostics/EventLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	 * @inheritdoc
43 43
 	 */
44 44
 	public function start($id, $description) {
45
-		if ($this->activated){
45
+		if ($this->activated) {
46 46
 			$this->events[$id] = new Event($id, $description, microtime(true));
47 47
 		}
48 48
 	}
Please login to merge, or discard this patch.
lib/private/Files/Utils/Scanner.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -118,17 +118,17 @@  discard block
 block discarded – undo
118 118
 	protected function attachListener($mount) {
119 119
 		$scanner = $mount->getStorage()->getScanner();
120 120
 		$emitter = $this;
121
-		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function ($path) use ($mount, $emitter) {
122
-			$emitter->emit('\OC\Files\Utils\Scanner', 'scanFile', array($mount->getMountPoint() . $path));
121
+		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function($path) use ($mount, $emitter) {
122
+			$emitter->emit('\OC\Files\Utils\Scanner', 'scanFile', array($mount->getMountPoint().$path));
123 123
 		});
124
-		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function ($path) use ($mount, $emitter) {
125
-			$emitter->emit('\OC\Files\Utils\Scanner', 'scanFolder', array($mount->getMountPoint() . $path));
124
+		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function($path) use ($mount, $emitter) {
125
+			$emitter->emit('\OC\Files\Utils\Scanner', 'scanFolder', array($mount->getMountPoint().$path));
126 126
 		});
127
-		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function ($path) use ($mount, $emitter) {
128
-			$emitter->emit('\OC\Files\Utils\Scanner', 'postScanFile', array($mount->getMountPoint() . $path));
127
+		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function($path) use ($mount, $emitter) {
128
+			$emitter->emit('\OC\Files\Utils\Scanner', 'postScanFile', array($mount->getMountPoint().$path));
129 129
 		});
130
-		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function ($path) use ($mount, $emitter) {
131
-			$emitter->emit('\OC\Files\Utils\Scanner', 'postScanFolder', array($mount->getMountPoint() . $path));
130
+		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function($path) use ($mount, $emitter) {
131
+			$emitter->emit('\OC\Files\Utils\Scanner', 'postScanFolder', array($mount->getMountPoint().$path));
132 132
 		});
133 133
 	}
134 134
 
@@ -160,13 +160,13 @@  discard block
 block discarded – undo
160 160
 			$scanner = $storage->getScanner();
161 161
 			$this->attachListener($mount);
162 162
 
163
-			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) {
163
+			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function($path) use ($storage) {
164 164
 				$this->triggerPropagator($storage, $path);
165 165
 			});
166
-			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) {
166
+			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function($path) use ($storage) {
167 167
 				$this->triggerPropagator($storage, $path);
168 168
 			});
169
-			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) {
169
+			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function($path) use ($storage) {
170 170
 				$this->triggerPropagator($storage, $path);
171 171
 			});
172 172
 
@@ -219,13 +219,13 @@  discard block
 block discarded – undo
219 219
 			$scanner->setUseTransactions(false);
220 220
 			$this->attachListener($mount);
221 221
 
222
-			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) {
222
+			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function($path) use ($storage) {
223 223
 				$this->postProcessEntry($storage, $path);
224 224
 			});
225
-			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) {
225
+			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function($path) use ($storage) {
226 226
 				$this->postProcessEntry($storage, $path);
227 227
 			});
228
-			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) {
228
+			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function($path) use ($storage) {
229 229
 				$this->postProcessEntry($storage, $path);
230 230
 			});
231 231
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 				}
248 248
 				$propagator->commitBatch();
249 249
 			} catch (StorageNotAvailableException $e) {
250
-				$this->logger->error('Storage ' . $storage->getId() . ' not available');
250
+				$this->logger->error('Storage '.$storage->getId().' not available');
251 251
 				$this->logger->logException($e);
252 252
 				$this->emit('\OC\Files\Utils\Scanner', 'StorageNotAvailable', [$e]);
253 253
 			}
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/ObjectTree.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 			if (isset($info['transferid'])) {
91 91
 				// getNodePath is called for multiple nodes within a chunk
92 92
 				// upload call
93
-				$path = $dir . '/' . $info['name'];
93
+				$path = $dir.'/'.$info['name'];
94 94
 				$path = ltrim($path, '/');
95 95
 			}
96 96
 		}
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 			} catch (StorageNotAvailableException $e) {
162 162
 				throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage is temporarily not available');
163 163
 			} catch (StorageInvalidException $e) {
164
-				throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid');
164
+				throw new \Sabre\DAV\Exception\NotFound('Storage '.$path.' is invalid');
165 165
 			} catch (LockedException $e) {
166 166
 				throw new \Sabre\DAV\Exception\Locked();
167 167
 			} catch (ForbiddenException $e) {
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		}
171 171
 
172 172
 		if (!$info) {
173
-			throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located');
173
+			throw new \Sabre\DAV\Exception\NotFound('File with name '.$path.' could not be located');
174 174
 		}
175 175
 
176 176
 		if ($info->getType() === 'dir') {
Please login to merge, or discard this patch.
lib/private/App/AppStore/Bundles/SocialSharingBundle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 	 * {@inheritDoc}
28 28
 	 */
29 29
 	public function getName() {
30
-		return (string)$this->l10n->t('Social sharing bundle');
30
+		return (string) $this->l10n->t('Social sharing bundle');
31 31
 	}
32 32
 
33 33
 	/**
Please login to merge, or discard this patch.
apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 	}
63 63
 
64 64
 	protected function run($argument) {
65
-		if($argument['retryNo'] === 5) {
65
+		if ($argument['retryNo'] === 5) {
66 66
 			return;
67 67
 		}
68 68
 
Please login to merge, or discard this patch.
settings/BackgroundJobs/VerifyUserData.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 
104 104
 	protected function run($argument) {
105 105
 
106
-		$try = (int)$argument['try'] + 1;
106
+		$try = (int) $argument['try'] + 1;
107 107
 
108
-		switch($argument['type']) {
108
+		switch ($argument['type']) {
109 109
 			case AccountManager::PROPERTY_WEBSITE:
110 110
 				$result = $this->verifyWebsite($argument);
111 111
 				break;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 				break;
116 116
 			default:
117 117
 				// no valid type given, no need to retry
118
-				$this->logger->error($argument['type'] . ' is no valid type for user account data.');
118
+				$this->logger->error($argument['type'].' is no valid type for user account data.');
119 119
 				$result = true;
120 120
 		}
121 121
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 		$result = false;
136 136
 
137
-		$url = rtrim($argument['data'], '/') . '/.well-known/' . 'CloudIdVerificationCode.txt';
137
+		$url = rtrim($argument['data'], '/').'/.well-known/'.'CloudIdVerificationCode.txt';
138 138
 
139 139
 		$client = $this->httpClientService->newClient();
140 140
 		try {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 			$user = $this->userManager->get($argument['uid']);
152 152
 			// we don't check a valid user -> give up
153 153
 			if ($user === null) {
154
-				$this->logger->error($argument['uid'] . ' doesn\'t exist, can\'t verify user data.');
154
+				$this->logger->error($argument['uid'].' doesn\'t exist, can\'t verify user data.');
155 155
 				return $result;
156 156
 			}
157 157
 			$userData = $this->accountManager->getUser($user);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
 		// we don't check a valid user -> give up
183 183
 		if ($user === null) {
184
-			$this->logger->error($argument['uid'] . ' doesn\'t exist, can\'t verify user data.');
184
+			$this->logger->error($argument['uid'].' doesn\'t exist, can\'t verify user data.');
185 185
 			return true;
186 186
 		}
187 187
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 		try {
221 221
 			$client = $this->httpClientService->newClient();
222 222
 			$response = $client->get(
223
-				$this->lookupServerUrl . '/users?search=' . urlencode($cloudId) . '&exactCloudId=1',
223
+				$this->lookupServerUrl.'/users?search='.urlencode($cloudId).'&exactCloudId=1',
224 224
 				[
225 225
 					'timeout' => 10,
226 226
 					'connect_timeout' => 3,
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 				'data' => $argument['data'],
254 254
 				'type' => $argument['type'],
255 255
 				'uid' => $argument['uid'],
256
-				'try' => (int)$argument['try'] + 1,
256
+				'try' => (int) $argument['try'] + 1,
257 257
 				'lastRun' => time()
258 258
 			]
259 259
 		);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 	 * @return bool
267 267
 	 */
268 268
 	protected function shouldRun(array $argument) {
269
-		$lastRun = (int)$argument['lastRun'];
269
+		$lastRun = (int) $argument['lastRun'];
270 270
 		return ((time() - $lastRun) > $this->interval);
271 271
 	}
272 272
 
Please login to merge, or discard this patch.
themes/example/defaults.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function getShortFooter() {
124 124
 		$footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'.
125
-			'<br/>' . $this->getSlogan();
125
+			'<br/>'.$this->getSlogan();
126 126
 
127 127
 		return $footer;
128 128
 	}
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	public function getLongFooter() {
135 135
 		$footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'.
136
-			'<br/>' . $this->getSlogan();
136
+			'<br/>'.$this->getSlogan();
137 137
 
138 138
 		return $footer;
139 139
 	}
140 140
 
141 141
 	public function buildDocLinkToKey($key) {
142
-		return $this->getDocBaseUrl() . '/server/12/go.php?to=' . $key;
142
+		return $this->getDocBaseUrl().'/server/12/go.php?to='.$key;
143 143
 	}
144 144
 
145 145
 
Please login to merge, or discard this patch.
lib/private/App/AppStore/Fetcher/Fetcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
 				if (isset($jsonBlob['ncversion']) && $jsonBlob['ncversion'] === $this->getVersion()) {
133 133
 
134 134
 					// If the timestamp is older than 300 seconds request the files new
135
-					if ((int)$jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) {
135
+					if ((int) $jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) {
136 136
 						return $jsonBlob['data'];
137 137
 					}
138 138
 
Please login to merge, or discard this patch.