Completed
Pull Request — master (#6360)
by Christoph
14:02
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/workflowengine/templates/admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	<h2 class="inlineblock"><?php p($_['heading']); ?></h2>
27 27
 	<?php if (!empty($_['docs'])): ?>
28 28
 		<a target="_blank" rel="noreferrer" class="icon-info svg"
29
-		   title="<?php p($l->t('Open documentation'));?>"
29
+		   title="<?php p($l->t('Open documentation')); ?>"
30 30
 		   href="<?php p(link_to_docs($_['docs'])); ?>">
31 31
 		</a>
32 32
 	<?php endif; ?>
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.
lib/private/legacy/image.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 */
146 146
 	public function widthTopLeft() {
147 147
 		$o = $this->getOrientation();
148
-		$this->logger->debug('OC_Image->widthTopLeft() Orientation: ' . $o, array('app' => 'core'));
148
+		$this->logger->debug('OC_Image->widthTopLeft() Orientation: '.$o, array('app' => 'core'));
149 149
 		switch ($o) {
150 150
 			case -1:
151 151
 			case 1:
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	 */
170 170
 	public function heightTopLeft() {
171 171
 		$o = $this->getOrientation();
172
-		$this->logger->debug('OC_Image->heightTopLeft() Orientation: ' . $o, array('app' => 'core'));
172
+		$this->logger->debug('OC_Image->heightTopLeft() Orientation: '.$o, array('app' => 'core'));
173 173
 		switch ($o) {
174 174
 			case -1:
175 175
 			case 1:
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		if ($mimeType === null) {
197 197
 			$mimeType = $this->mimeType();
198 198
 		}
199
-		header('Content-Type: ' . $mimeType);
199
+		header('Content-Type: '.$mimeType);
200 200
 		return $this->_output(null, $mimeType);
201 201
 	}
202 202
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		}
215 215
 		if ($filePath === null) {
216 216
 			if ($this->filePath === null) {
217
-				$this->logger->error(__METHOD__ . '(): called with no path.', array('app' => 'core'));
217
+				$this->logger->error(__METHOD__.'(): called with no path.', array('app' => 'core'));
218 218
 				return false;
219 219
 			} else {
220 220
 				$filePath = $this->filePath;
@@ -238,10 +238,10 @@  discard block
 block discarded – undo
238 238
 			}
239 239
 			$isWritable = is_writable(dirname($filePath));
240 240
 			if (!$isWritable) {
241
-				$this->logger->error(__METHOD__ . '(): Directory \'' . dirname($filePath) . '\' is not writable.', array('app' => 'core'));
241
+				$this->logger->error(__METHOD__.'(): Directory \''.dirname($filePath).'\' is not writable.', array('app' => 'core'));
242 242
 				return false;
243 243
 			} elseif ($isWritable && file_exists($filePath) && !is_writable($filePath)) {
244
-				$this->logger->error(__METHOD__ . '(): File \'' . $filePath . '\' is not writable.', array('app' => 'core'));
244
+				$this->logger->error(__METHOD__.'(): File \''.$filePath.'\' is not writable.', array('app' => 'core'));
245 245
 				return false;
246 246
 			}
247 247
 		}
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 					$imageType = IMAGETYPE_BMP;
270 270
 					break;
271 271
 				default:
272
-					throw new Exception('\OC_Image::_output(): "' . $mimeType . '" is not supported when forcing a specific output format');
272
+					throw new Exception('\OC_Image::_output(): "'.$mimeType.'" is not supported when forcing a specific output format');
273 273
 			}
274 274
 		}
275 275
 
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 			return;
418 418
 		}
419 419
 
420
-		$exif = @exif_read_data('data://image/jpeg;base64,' . base64_encode($data));
420
+		$exif = @exif_read_data('data://image/jpeg;base64,'.base64_encode($data));
421 421
 		if (!$exif) {
422 422
 			return;
423 423
 		}
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 	 */
436 436
 	public function fixOrientation() {
437 437
 		$o = $this->getOrientation();
438
-		$this->logger->debug('OC_Image->fixOrientation() Orientation: ' . $o, array('app' => 'core'));
438
+		$this->logger->debug('OC_Image->fixOrientation() Orientation: '.$o, array('app' => 'core'));
439 439
 		$rotate = 0;
440 440
 		$flip = false;
441 441
 		switch ($o) {
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 				$rotate = 90;
471 471
 				break;
472 472
 		}
473
-		if($flip && function_exists('imageflip')) {
473
+		if ($flip && function_exists('imageflip')) {
474 474
 			imageflip($this->resource, IMG_FLIP_HORIZONTAL);
475 475
 		}
476 476
 		if ($rotate) {
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 		} elseif ($this->loadFromData($imageRef) !== false) {
519 519
 			return $this->resource;
520 520
 		}
521
-		$this->logger->debug(__METHOD__ . '(): could not load anything. Giving up!', array('app' => 'core'));
521
+		$this->logger->debug(__METHOD__.'(): could not load anything. Giving up!', array('app' => 'core'));
522 522
 		return false;
523 523
 	}
524 524
 
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 					imagealphablending($this->resource, true);
558 558
 					imagesavealpha($this->resource, true);
559 559
 				} else {
560
-					$this->logger->debug('OC_Image->loadFromFile, GIF images not supported: ' . $imagePath, array('app' => 'core'));
560
+					$this->logger->debug('OC_Image->loadFromFile, GIF images not supported: '.$imagePath, array('app' => 'core'));
561 561
 				}
562 562
 				break;
563 563
 			case IMAGETYPE_JPEG:
@@ -565,10 +565,10 @@  discard block
 block discarded – undo
565 565
 					if (getimagesize($imagePath) !== false) {
566 566
 						$this->resource = @imagecreatefromjpeg($imagePath);
567 567
 					} else {
568
-						$this->logger->debug('OC_Image->loadFromFile, JPG image not valid: ' . $imagePath, array('app' => 'core'));
568
+						$this->logger->debug('OC_Image->loadFromFile, JPG image not valid: '.$imagePath, array('app' => 'core'));
569 569
 					}
570 570
 				} else {
571
-					$this->logger->debug('OC_Image->loadFromFile, JPG images not supported: ' . $imagePath, array('app' => 'core'));
571
+					$this->logger->debug('OC_Image->loadFromFile, JPG images not supported: '.$imagePath, array('app' => 'core'));
572 572
 				}
573 573
 				break;
574 574
 			case IMAGETYPE_PNG:
@@ -578,21 +578,21 @@  discard block
 block discarded – undo
578 578
 					imagealphablending($this->resource, true);
579 579
 					imagesavealpha($this->resource, true);
580 580
 				} else {
581
-					$this->logger->debug('OC_Image->loadFromFile, PNG images not supported: ' . $imagePath, array('app' => 'core'));
581
+					$this->logger->debug('OC_Image->loadFromFile, PNG images not supported: '.$imagePath, array('app' => 'core'));
582 582
 				}
583 583
 				break;
584 584
 			case IMAGETYPE_XBM:
585 585
 				if (imagetypes() & IMG_XPM) {
586 586
 					$this->resource = @imagecreatefromxbm($imagePath);
587 587
 				} else {
588
-					$this->logger->debug('OC_Image->loadFromFile, XBM/XPM images not supported: ' . $imagePath, array('app' => 'core'));
588
+					$this->logger->debug('OC_Image->loadFromFile, XBM/XPM images not supported: '.$imagePath, array('app' => 'core'));
589 589
 				}
590 590
 				break;
591 591
 			case IMAGETYPE_WBMP:
592 592
 				if (imagetypes() & IMG_WBMP) {
593 593
 					$this->resource = @imagecreatefromwbmp($imagePath);
594 594
 				} else {
595
-					$this->logger->debug('OC_Image->loadFromFile, WBMP images not supported: ' . $imagePath, array('app' => 'core'));
595
+					$this->logger->debug('OC_Image->loadFromFile, WBMP images not supported: '.$imagePath, array('app' => 'core'));
596 596
 				}
597 597
 				break;
598 598
 			case IMAGETYPE_BMP:
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 	 */
703 703
 	private function imagecreatefrombmp($fileName) {
704 704
 		if (!($fh = fopen($fileName, 'rb'))) {
705
-			$this->logger->warning('imagecreatefrombmp: Can not open ' . $fileName, array('app' => 'core'));
705
+			$this->logger->warning('imagecreatefrombmp: Can not open '.$fileName, array('app' => 'core'));
706 706
 			return false;
707 707
 		}
708 708
 		// read file header
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 		// check for bitmap
711 711
 		if ($meta['type'] != 19778) {
712 712
 			fclose($fh);
713
-			$this->logger->warning('imagecreatefrombmp: Can not open ' . $fileName . ' is not a bitmap!', array('app' => 'core'));
713
+			$this->logger->warning('imagecreatefrombmp: Can not open '.$fileName.' is not a bitmap!', array('app' => 'core'));
714 714
 			return false;
715 715
 		}
716 716
 		// read image header
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 				$meta['imagesize'] = @filesize($fileName) - $meta['offset'];
735 735
 				if ($meta['imagesize'] < 1) {
736 736
 					fclose($fh);
737
-					$this->logger->warning('imagecreatefrombmp: Can not obtain file size of ' . $fileName . ' is not a bitmap!', array('app' => 'core'));
737
+					$this->logger->warning('imagecreatefrombmp: Can not obtain file size of '.$fileName.' is not a bitmap!', array('app' => 'core'));
738 738
 					return false;
739 739
 				}
740 740
 			}
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
 		// read color palette
745 745
 		$palette = array();
746 746
 		if ($meta['bits'] < 16) {
747
-			$palette = unpack('l' . $meta['colors'], fread($fh, $meta['colors'] * 4));
747
+			$palette = unpack('l'.$meta['colors'], fread($fh, $meta['colors'] * 4));
748 748
 			// in rare cases the color value is signed
749 749
 			if ($palette[1] < 0) {
750 750
 				foreach ($palette as $i => $color) {
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 		if ($im == false) {
758 758
 			fclose($fh);
759 759
 			$this->logger->warning(
760
-				'imagecreatefrombmp: imagecreatetruecolor failed for file "' . $fileName . '" with dimensions ' . $meta['width'] . 'x' . $meta['height'],
760
+				'imagecreatefrombmp: imagecreatetruecolor failed for file "'.$fileName.'" with dimensions '.$meta['width'].'x'.$meta['height'],
761 761
 				array('app' => 'core'));
762 762
 			return false;
763 763
 		}
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 		$p = 0;
767 767
 		$vide = chr(0);
768 768
 		$y = $meta['height'] - 1;
769
-		$error = 'imagecreatefrombmp: ' . $fileName . ' has not enough data!';
769
+		$error = 'imagecreatefrombmp: '.$fileName.' has not enough data!';
770 770
 		// loop through the image data beginning with the lower left corner
771 771
 		while ($y >= 0) {
772 772
 			$x = 0;
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
 							$this->logger->warning($error, array('app' => 'core'));
779 779
 							return $im;
780 780
 						}
781
-						$color = @unpack('V', $part . $vide);
781
+						$color = @unpack('V', $part.$vide);
782 782
 						break;
783 783
 					case 16:
784 784
 						if (!($part = substr($data, $p, 2))) {
@@ -790,16 +790,16 @@  discard block
 block discarded – undo
790 790
 						$color[1] = (($color[1] & 0xf800) >> 8) * 65536 + (($color[1] & 0x07e0) >> 3) * 256 + (($color[1] & 0x001f) << 3);
791 791
 						break;
792 792
 					case 8:
793
-						$color = @unpack('n', $vide . substr($data, $p, 1));
793
+						$color = @unpack('n', $vide.substr($data, $p, 1));
794 794
 						$color[1] = (isset($palette[$color[1] + 1])) ? $palette[$color[1] + 1] : $palette[1];
795 795
 						break;
796 796
 					case 4:
797
-						$color = @unpack('n', $vide . substr($data, floor($p), 1));
797
+						$color = @unpack('n', $vide.substr($data, floor($p), 1));
798 798
 						$color[1] = ($p * 2) % 2 == 0 ? $color[1] >> 4 : $color[1] & 0x0F;
799 799
 						$color[1] = (isset($palette[$color[1] + 1])) ? $palette[$color[1] + 1] : $palette[1];
800 800
 						break;
801 801
 					case 1:
802
-						$color = @unpack('n', $vide . substr($data, floor($p), 1));
802
+						$color = @unpack('n', $vide.substr($data, floor($p), 1));
803 803
 						switch (($p * 8) % 8) {
804 804
 							case 0:
805 805
 								$color[1] = $color[1] >> 7;
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 						break;
831 831
 					default:
832 832
 						fclose($fh);
833
-						$this->logger->warning('imagecreatefrombmp: ' . $fileName . ' has ' . $meta['bits'] . ' bits and this is not supported!', array('app' => 'core'));
833
+						$this->logger->warning('imagecreatefrombmp: '.$fileName.' has '.$meta['bits'].' bits and this is not supported!', array('app' => 'core'));
834 834
 						return false;
835 835
 				}
836 836
 				imagesetpixel($im, $x, $y, $color[1]);
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
 	 */
853 853
 	public function resize($maxSize) {
854 854
 		if (!$this->valid()) {
855
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
855
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
856 856
 			return false;
857 857
 		}
858 858
 		$widthOrig = imagesx($this->resource);
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
 	 */
879 879
 	public function preciseResize($width, $height) {
880 880
 		if (!$this->valid()) {
881
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
881
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
882 882
 			return false;
883 883
 		}
884 884
 		$widthOrig = imagesx($this->resource);
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 		$process = imagecreatetruecolor($width, $height);
887 887
 
888 888
 		if ($process == false) {
889
-			$this->logger->error(__METHOD__ . '(): Error creating true color image', array('app' => 'core'));
889
+			$this->logger->error(__METHOD__.'(): Error creating true color image', array('app' => 'core'));
890 890
 			imagedestroy($process);
891 891
 			return false;
892 892
 		}
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
 
901 901
 		imagecopyresampled($process, $this->resource, 0, 0, 0, 0, $width, $height, $widthOrig, $heightOrig);
902 902
 		if ($process == false) {
903
-			$this->logger->error(__METHOD__ . '(): Error re-sampling process image', array('app' => 'core'));
903
+			$this->logger->error(__METHOD__.'(): Error re-sampling process image', array('app' => 'core'));
904 904
 			imagedestroy($process);
905 905
 			return false;
906 906
 		}
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
 
959 959
 		imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $targetWidth, $targetHeight, $width, $height);
960 960
 		if ($process == false) {
961
-			$this->logger->error('OC_Image->centerCrop, Error re-sampling process image ' . $width . 'x' . $height, array('app' => 'core'));
961
+			$this->logger->error('OC_Image->centerCrop, Error re-sampling process image '.$width.'x'.$height, array('app' => 'core'));
962 962
 			imagedestroy($process);
963 963
 			return false;
964 964
 		}
@@ -978,12 +978,12 @@  discard block
 block discarded – undo
978 978
 	 */
979 979
 	public function crop($x, $y, $w, $h) {
980 980
 		if (!$this->valid()) {
981
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
981
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
982 982
 			return false;
983 983
 		}
984 984
 		$process = imagecreatetruecolor($w, $h);
985 985
 		if ($process == false) {
986
-			$this->logger->error(__METHOD__ . '(): Error creating true color image', array('app' => 'core'));
986
+			$this->logger->error(__METHOD__.'(): Error creating true color image', array('app' => 'core'));
987 987
 			imagedestroy($process);
988 988
 			return false;
989 989
 		}
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
 
998 998
 		imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $w, $h, $w, $h);
999 999
 		if ($process == false) {
1000
-			$this->logger->error(__METHOD__ . '(): Error re-sampling process image ' . $w . 'x' . $h, array('app' => 'core'));
1000
+			$this->logger->error(__METHOD__.'(): Error re-sampling process image '.$w.'x'.$h, array('app' => 'core'));
1001 1001
 			imagedestroy($process);
1002 1002
 			return false;
1003 1003
 		}
@@ -1017,7 +1017,7 @@  discard block
 block discarded – undo
1017 1017
 	 */
1018 1018
 	public function fitIn($maxWidth, $maxHeight) {
1019 1019
 		if (!$this->valid()) {
1020
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
1020
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
1021 1021
 			return false;
1022 1022
 		}
1023 1023
 		$widthOrig = imagesx($this->resource);
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 	 */
1041 1041
 	public function scaleDownToFit($maxWidth, $maxHeight) {
1042 1042
 		if (!$this->valid()) {
1043
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
1043
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
1044 1044
 			return false;
1045 1045
 		}
1046 1046
 		$widthOrig = imagesx($this->resource);
@@ -1098,7 +1098,7 @@  discard block
 block discarded – undo
1098 1098
 		if ($bit <= 8) {
1099 1099
 			for ($i = 0; $i < $colorsNum; $i++) {
1100 1100
 				$colors = imagecolorsforindex($im, $i);
1101
-				$rgbQuad .= chr($colors['blue']) . chr($colors['green']) . chr($colors['red']) . "\0";
1101
+				$rgbQuad .= chr($colors['blue']).chr($colors['green']).chr($colors['red'])."\0";
1102 1102
 			}
1103 1103
 			$bmpData = '';
1104 1104
 			if ($compression == 0 || $bit < 8) {
@@ -1131,7 +1131,7 @@  discard block
 block discarded – undo
1131 1131
 						$index = imagecolorat($im, $i, $j);
1132 1132
 						if ($index !== $lastIndex || $sameNum > 255) {
1133 1133
 							if ($sameNum != 0) {
1134
-								$bmpData .= chr($sameNum) . chr($lastIndex);
1134
+								$bmpData .= chr($sameNum).chr($lastIndex);
1135 1135
 							}
1136 1136
 							$lastIndex = $index;
1137 1137
 							$sameNum = 1;
@@ -1172,15 +1172,15 @@  discard block
 block discarded – undo
1172 1172
 			$sizeData = strlen($bmpData);
1173 1173
 			$colorsNum = 0;
1174 1174
 		}
1175
-		$fileHeader = 'BM' . pack('V3', 54 + $sizeQuad + $sizeData, 0, 54 + $sizeQuad);
1175
+		$fileHeader = 'BM'.pack('V3', 54 + $sizeQuad + $sizeData, 0, 54 + $sizeQuad);
1176 1176
 		$infoHeader = pack('V3v2V*', 0x28, $width, $height, 1, $bit, $compression, $sizeData, 0, 0, $colorsNum, 0);
1177 1177
 		if ($fileName != '') {
1178 1178
 			$fp = fopen($fileName, 'wb');
1179
-			fwrite($fp, $fileHeader . $infoHeader . $rgbQuad . $bmpData);
1179
+			fwrite($fp, $fileHeader.$infoHeader.$rgbQuad.$bmpData);
1180 1180
 			fclose($fp);
1181 1181
 			return true;
1182 1182
 		}
1183
-		echo $fileHeader . $infoHeader . $rgbQuad . $bmpData;
1183
+		echo $fileHeader.$infoHeader.$rgbQuad.$bmpData;
1184 1184
 		return true;
1185 1185
 	}
1186 1186
 }
Please login to merge, or discard this patch.