From: Tim Düsterhus Date: Tue, 23 Feb 2021 10:16:33 +0000 (+0100) Subject: Simplify object type sorting in RebuildDataPage X-Git-Tag: 5.4.0_Alpha_1~239 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=26e70750b70b1e1ef457883a2fb008b16ece7bbd;p=GitHub%2FWoltLab%2FWCF.git Simplify object type sorting in RebuildDataPage --- diff --git a/wcfsetup/install/files/lib/acp/page/RebuildDataPage.class.php b/wcfsetup/install/files/lib/acp/page/RebuildDataPage.class.php index adaa1dd928..ad72c12a57 100644 --- a/wcfsetup/install/files/lib/acp/page/RebuildDataPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/RebuildDataPage.class.php @@ -44,16 +44,7 @@ class RebuildDataPage extends AbstractPage // sort object types \uasort($this->objectTypes, static function ($a, $b) { - $niceValueA = ($a->nicevalue ?: 0); - $niceValueB = ($b->nicevalue ?: 0); - - if ($niceValueA < $niceValueB) { - return -1; - } elseif ($niceValueA > $niceValueB) { - return 1; - } - - return 0; + return ($a->nicevalue ?: 0) <=> ($b->nicevalue ?: 0); }); }