Completed
Push — master ( 9cef2c...9cef2c )
by Maxence
02:35 queued 44s
created
lib/private/Avatar/Avatar.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 		if (empty($displayName) === true) {
80 80
 			return '?';
81 81
 		}
82
-		$firstTwoLetters = array_map(function ($namePart) {
82
+		$firstTwoLetters = array_map(function($namePart) {
83 83
 			return mb_strtoupper(mb_substr($namePart, 0, 1), 'UTF-8');
84 84
 		}, explode(' ', $displayName, 2));
85 85
 		return implode('', $firstTwoLetters);
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 			return null;
131 131
 		}
132 132
 		try {
133
-			$font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
133
+			$font = __DIR__.'/../../../core/fonts/NotoSans-Regular.ttf';
134 134
 			$svg = $this->getAvatarVector($size, $darkTheme);
135 135
 			$avatar = new Imagick();
136 136
 			$avatar->setFont($font);
137 137
 			$avatar->readImageBlob($svg);
138 138
 			$avatar->setImageFormat('png');
139 139
 			$image = new \OCP\Image();
140
-			$image->loadFromData((string)$avatar);
140
+			$image->loadFromData((string) $avatar);
141 141
 			return $image->data();
142 142
 		} catch (\Exception $e) {
143 143
 			return null;
@@ -166,11 +166,11 @@  discard block
 block discarded – undo
166 166
 		);
167 167
 		imagefilledrectangle($im, 0, 0, $size, $size, $background);
168 168
 
169
-		$font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
169
+		$font = __DIR__.'/../../../core/fonts/NotoSans-Regular.ttf';
170 170
 
171 171
 		$fontSize = $size * 0.4;
172 172
 		[$x, $y] = $this->imageTTFCenter(
173
-			$im, $text, $font, (int)$fontSize
173
+			$im, $text, $font, (int) $fontSize
174 174
 		);
175 175
 
176 176
 		imagettftext($im, $fontSize, 0, $x, $y, $textColor, $font, $text);
Please login to merge, or discard this patch.