Code Duplication    Length = 9-9 lines in 2 locations

main/inc/lib/display.lib.php 2 locations

@@ 2087-2095 (lines=9) @@
2084
            $type = isset($condition['type']) ? $condition['type'] : 'positive';
2085
            $mode = isset($condition['mode']) ? $condition['mode'] : 'add';
2086
            switch ($type) {
2087
                case 'positive':
2088
                    if (in_array($itemId, $array)) {
2089
                        if ($mode == 'overwrite') {
2090
                            $class = " $defaultClass $class_to_applied";
2091
                        } else {
2092
                            $class .= " $class_to_applied";
2093
                        }
2094
                    }
2095
                    break;
2096
                case 'negative':
2097
                    if (!in_array($itemId, $array)) {
2098
                        if ($mode == 'overwrite') {
@@ 2096-2104 (lines=9) @@
2093
                        }
2094
                    }
2095
                    break;
2096
                case 'negative':
2097
                    if (!in_array($itemId, $array)) {
2098
                        if ($mode == 'overwrite') {
2099
                            $class = " $defaultClass $class_to_applied";
2100
                        } else {
2101
                            $class .= " $class_to_applied";
2102
                        }
2103
                    }
2104
                    break;
2105
            }
2106
        }
2107
        if ($isCurrent) {