Remove PackageInstallationDispatcher::convertShorthandByteValue()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 10 Aug 2022 09:05:57 +0000 (11:05 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 10 Aug 2022 10:28:34 +0000 (12:28 +0200)
This method existed for use with compareSetting().

wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php

index e3357287d7f4508e51347f3b235d1557aabfddc3..baa56129f9f6c97bd4e7394957e11211f73025bc 100644 (file)
@@ -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;
-        }
-    }
 }