From a344d15a61270c7fc1a2e9d7acfd4fd3763475aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 10 Aug 2022 11:05:57 +0200 Subject: [PATCH] Remove PackageInstallationDispatcher::convertShorthandByteValue() This method existed for use with compareSetting(). --- .../PackageInstallationDispatcher.class.php | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index e3357287d7..baa56129f9 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -1213,34 +1213,4 @@ class PackageInstallationDispatcher $this->queue = new PackageInstallationQueue($this->queue->queueID); } } - - /** - * Converts shorthand byte values into an integer representing bytes. - * - * @param string $value - * @return int - * @see http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes - */ - protected static function convertShorthandByteValue($value) - { - // convert into bytes - $lastCharacter = \mb_substr($value, -1); - switch ($lastCharacter) { - case 'g': // gigabytes - return (int)$value * 1073741824; - break; - - case 'm': // megabytes - return (int)$value * 1048576; - break; - - case 'k': // kilobytes - return (int)$value * 1024; - break; - - default: - return $value; - break; - } - } } -- 2.20.1