From cfed9165d7647740b787c5b7053e59d8b6285ca2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 17 Feb 2021 15:36:00 +0100 Subject: [PATCH] Remove deprecated methods from IUserAvatar interface --- .../data/user/avatar/DefaultAvatar.class.php | 4 ++-- .../lib/data/user/avatar/IUserAvatar.class.php | 17 ----------------- .../lib/data/user/avatar/UserAvatar.class.php | 16 ++++++++-------- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php b/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php index bdd819ca14..d69b8c9fd0 100644 --- a/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php +++ b/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php @@ -105,7 +105,7 @@ SVG; } /** - * @inheritDoc + * @deprecated 3.0 */ public function canCrop() { @@ -113,7 +113,7 @@ SVG; } /** - * @inheritDoc + * @deprecated 3.0 */ public function getCropImageTag($size = null) { diff --git a/wcfsetup/install/files/lib/data/user/avatar/IUserAvatar.class.php b/wcfsetup/install/files/lib/data/user/avatar/IUserAvatar.class.php index 2cb2cd24a1..b9c34918b2 100644 --- a/wcfsetup/install/files/lib/data/user/avatar/IUserAvatar.class.php +++ b/wcfsetup/install/files/lib/data/user/avatar/IUserAvatar.class.php @@ -12,14 +12,6 @@ namespace wcf\data\user\avatar; */ interface IUserAvatar { - /** - * Returns true if this avatar can be cropped. - * - * @return bool - * @deprecated 3.0 - */ - public function canCrop(); - /** * Returns the url to this avatar. * @@ -36,15 +28,6 @@ interface IUserAvatar */ public function getImageTag($size = null); - /** - * Returns the image tag used for cropping. - * - * @param int $size - * @return string - * @deprecated 3.0 - */ - public function getCropImageTag($size = null); - /** * Returns the width of this avatar. * diff --git a/wcfsetup/install/files/lib/data/user/avatar/UserAvatar.class.php b/wcfsetup/install/files/lib/data/user/avatar/UserAvatar.class.php index 225d724e16..0ff38f04dd 100644 --- a/wcfsetup/install/files/lib/data/user/avatar/UserAvatar.class.php +++ b/wcfsetup/install/files/lib/data/user/avatar/UserAvatar.class.php @@ -113,29 +113,29 @@ class UserAvatar extends DatabaseObject implements IUserAvatar /** * @inheritDoc */ - public function getCropImageTag($size = null) + public function getWidth() { - return ''; + return $this->width; } /** * @inheritDoc */ - public function getWidth() + public function getHeight() { - return $this->width; + return $this->height; } /** - * @inheritDoc + * @deprecated 3.0 */ - public function getHeight() + public function getCropImageTag($size = null) { - return $this->height; + return ''; } /** - * @inheritDoc + * @deprecated 3.0 */ public function canCrop() { -- 2.20.1