diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-05-28 11:06:33 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-13 18:46:05 +0200 |
commit | 16ec9d96708793cc6d7016743d6d8ba9182088bd (patch) | |
tree | 36b9eed50f0da78fa79dcf068e0fcffca444e204 | |
parent | 156da29ceade106176e2288ef391c4cb2006d800 (diff) | |
download | nextcloud-server-16ec9d96708793cc6d7016743d6d8ba9182088bd.tar.gz nextcloud-server-16ec9d96708793cc6d7016743d6d8ba9182088bd.zip |
Removed old route, fix tests and fix var type
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | core/routes.php | 1 | ||||
-rw-r--r-- | lib/private/Avatar.php | 2 | ||||
-rw-r--r-- | tests/lib/AvatarTest.php | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/core/routes.php b/core/routes.php index dd35638a7ee..cc1bd34d898 100644 --- a/core/routes.php +++ b/core/routes.php @@ -42,7 +42,6 @@ $application->registerRoutes($this, [ ['name' => 'lost#setPassword', 'url' => '/lostpassword/set/{token}/{userId}', 'verb' => 'POST'], ['name' => 'user#getDisplayNames', 'url' => '/displaynames', 'verb' => 'POST'], ['name' => 'avatar#getAvatar', 'url' => '/avatar/{userId}/{size}', 'verb' => 'GET'], - ['name' => 'avatar#getAvatarPng', 'url' => '/avatar/{userId}/{size}/png', 'verb' => 'GET'], ['name' => 'avatar#deleteAvatar', 'url' => '/avatar/', 'verb' => 'DELETE'], ['name' => 'avatar#postCroppedAvatar', 'url' => '/avatar/cropped', 'verb' => 'POST'], ['name' => 'avatar#getTmpAvatar', 'url' => '/avatar/tmp', 'verb' => 'GET'], diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php index 270f69a96ad..9dbeb4ac745 100644 --- a/lib/private/Avatar.php +++ b/lib/private/Avatar.php @@ -301,7 +301,7 @@ class Avatar implements IAvatar { * Generate png avatar from svg with Imagick * * @param int $size - * @return string + * @return string|boolean */ private function generateAvatarFromSvg(int $size) { if (!extension_loaded('imagick')) { diff --git a/tests/lib/AvatarTest.php b/tests/lib/AvatarTest.php index 67fde694b8e..759dd385564 100644 --- a/tests/lib/AvatarTest.php +++ b/tests/lib/AvatarTest.php @@ -232,7 +232,7 @@ class AvatarTest extends \Test\TestCase { public function testGenerateSvgAvatar() { $avatar = $this->invokePrivate($this->avatar, 'getAvatarVector', [64]); - $svg = ' + $svg = '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="64" height="64" version="1.1" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"> <rect width="100%" height="100%" fill="#0082c9"></rect> <text x="50%" y="350" style="font-weight:600;font-size:278px;font-family:\'Open Sans\';text-anchor:middle;fill:#fff">A</text> |