@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | if (empty($displayName) === true) { |
96 | 96 | return '?'; |
97 | 97 | } |
98 | - $firstTwoLetters = array_map(function ($namePart) { |
|
98 | + $firstTwoLetters = array_map(function($namePart) { |
|
99 | 99 | return mb_strtoupper(mb_substr($namePart, 0, 1), 'UTF-8'); |
100 | 100 | }, explode(' ', $displayName, 2)); |
101 | 101 | return implode('', $firstTwoLetters); |
@@ -149,14 +149,14 @@ discard block |
||
149 | 149 | return false; |
150 | 150 | } |
151 | 151 | try { |
152 | - $font = __DIR__ . '/../../core/fonts/NotoSans-Regular.ttf'; |
|
152 | + $font = __DIR__.'/../../core/fonts/NotoSans-Regular.ttf'; |
|
153 | 153 | $svg = $this->getAvatarVector($size); |
154 | 154 | $avatar = new Imagick(); |
155 | 155 | $avatar->setFont($font); |
156 | 156 | $avatar->readImageBlob($svg); |
157 | 157 | $avatar->setImageFormat('png'); |
158 | 158 | $image = new OC_Image(); |
159 | - $image->loadFromData((string)$avatar); |
|
159 | + $image->loadFromData((string) $avatar); |
|
160 | 160 | $data = $image->data(); |
161 | 161 | return $data === null ? false : $data; |
162 | 162 | } catch (\Exception $e) { |
@@ -185,11 +185,11 @@ discard block |
||
185 | 185 | $white = imagecolorallocate($im, 255, 255, 255); |
186 | 186 | imagefilledrectangle($im, 0, 0, $size, $size, $background); |
187 | 187 | |
188 | - $font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf'; |
|
188 | + $font = __DIR__.'/../../../core/fonts/NotoSans-Regular.ttf'; |
|
189 | 189 | |
190 | 190 | $fontSize = $size * 0.4; |
191 | 191 | [$x, $y] = $this->imageTTFCenter( |
192 | - $im, $text, $font, (int)$fontSize |
|
192 | + $im, $text, $font, (int) $fontSize |
|
193 | 193 | ); |
194 | 194 | |
195 | 195 | imagettftext($im, $fontSize, 0, $x, $y, $white, $font, $text); |