Passed
Push — master ( b69b17...32a6f4 )
by Morris
11:33
created
lib/private/Avatar/Avatar.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 			return false;
142 142
 		}
143 143
 		try {
144
-			$font = __DIR__ . '/../../core/fonts/Nunito-Regular.ttf';
144
+			$font = __DIR__.'/../../core/fonts/Nunito-Regular.ttf';
145 145
 			$svg = $this->getAvatarVector($size);
146 146
 			$avatar = new Imagick();
147 147
 			$avatar->setFont($font);
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
 		$white = imagecolorallocate($im, 255, 255, 255);
177 177
 		imagefilledrectangle($im, 0, 0, $size, $size, $background);
178 178
 
179
-		$font = __DIR__ . '/../../../core/fonts/Nunito-Regular.ttf';
179
+		$font = __DIR__.'/../../../core/fonts/Nunito-Regular.ttf';
180 180
 
181 181
 		$fontSize = $size * 0.4;
182 182
 		list($x, $y) = $this->imageTTFCenter(
183
-			$im, $letter, $font, (int)$fontSize
183
+			$im, $letter, $font, (int) $fontSize
184 184
 		);
185 185
 
186 186
 		imagettftext($im, $fontSize, 0, $x, $y, $white, $font, $letter);
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 		$hash = strtolower($hash);
293 293
 
294 294
 		// Already a md5 hash?
295
-		if( preg_match('/^([0-9a-f]{4}-?){8}$/', $hash, $matches) !== 1 ) {
295
+		if (preg_match('/^([0-9a-f]{4}-?){8}$/', $hash, $matches) !== 1) {
296 296
 			$hash = md5($hash);
297 297
 		}
298 298
 
Please login to merge, or discard this patch.
lib/private/Avatar/UserAvatar.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 		$this->remove();
101 101
 		$type = $this->getAvatarImageType($img);
102
-		$file = $this->folder->newFile('avatar.' . $type);
102
+		$file = $this->folder->newFile('avatar.'.$type);
103 103
 		$file->putContent($data);
104 104
 
105 105
 		try {
@@ -250,9 +250,9 @@  discard block
 block discarded – undo
250 250
 		}
251 251
 
252 252
 		if ($size === -1) {
253
-			$path = 'avatar.' . $ext;
253
+			$path = 'avatar.'.$ext;
254 254
 		} else {
255
-			$path = 'avatar.' . $size . '.' . $ext;
255
+			$path = 'avatar.'.$size.'.'.$ext;
256 256
 		}
257 257
 
258 258
 		try {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 
270 270
 			} else {
271 271
 				$avatar = new OC_Image();
272
-				$file = $this->folder->getFile('avatar.' . $ext);
272
+				$file = $this->folder->getFile('avatar.'.$ext);
273 273
 				$avatar->loadFromData($file->getContent());
274 274
 				$avatar->resize($size);
275 275
 				$data = $avatar->data();
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 				$file = $this->folder->newFile($path);
280 280
 				$file->putContent($data);
281 281
 			} catch (NotPermittedException $e) {
282
-				$this->logger->error('Failed to save avatar for ' . $this->user->getUID());
282
+				$this->logger->error('Failed to save avatar for '.$this->user->getUID());
283 283
 				throw new NotFoundException();
284 284
 			}
285 285
 
Please login to merge, or discard this patch.