2 namespace wcf\system\option\user\group;
5 * User group option type implementation for integer input fields.
7 * The merge of option values returns -1 if all values are -1 otherwise the lowest
11 * @copyright 2001-2018 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package WoltLabSuite\Core\System\Option\User\Group
15 class InfiniteInverseIntegerUserGroupOptionType extends InverseIntegerUserGroupOptionType {
19 public function merge($defaultValue, $groupValue) {
20 if ($groupValue == -1 || $defaultValue == $groupValue) {
24 if ($defaultValue == -1) {
28 return min($defaultValue, $groupValue);
34 public function compare($value1, $value2) {
35 if ($value1 == $value2) {
42 else if ($value2 == -1) {
46 return ($value1 < $value2) ? 1 : -1;