Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 2066-2074 (lines=9) @@
2063
            $type = isset($condition['type']) ? $condition['type'] : 'positive';
2064
            $mode = isset($condition['mode']) ? $condition['mode'] : 'add';
2065
            switch ($type) {
2066
                case 'positive':
2067
                    if (in_array($itemId, $array)) {
2068
                        if ($mode == 'overwrite') {
2069
                            $class = " $defaultClass $class_to_applied";
2070
                        } else {
2071
                            $class .= " $class_to_applied";
2072
                        }
2073
                    }
2074
                    break;
2075
                case 'negative':
2076
                    if (!in_array($itemId, $array)) {
2077
                        if ($mode == 'overwrite') {
@@ 2075-2083 (lines=9) @@
2072
                        }
2073
                    }
2074
                    break;
2075
                case 'negative':
2076
                    if (!in_array($itemId, $array)) {
2077
                        if ($mode == 'overwrite') {
2078
                            $class = " $defaultClass $class_to_applied";
2079
                        } else {
2080
                            $class .= " $class_to_applied";
2081
                        }
2082
                    }
2083
                    break;
2084
            }
2085
        }
2086
        if ($isCurrent) {