Code Duplication    Length = 4-5 lines in 2 locations

main/inc/lib/plugin.class.php 1 location

@@ 185-188 (lines=4) @@
182
183
        foreach ($this->fields as $name => $type) {
184
            $options = null;
185
            if (is_array($type) && isset($type['type']) && $type['type'] === "select") {
186
                $options = $type['options'];
187
                $type = $type['type'];
188
            }
189
190
            $value = $this->get($name);
191

main/inc/lib/skill.lib.php 1 location

@@ 1141-1145 (lines=5) @@
1138
                $tmp['counter'] = $counter;
1139
                $counter++;
1140
1141
                if (isset($elem['data']) && is_array($elem['data'])) {
1142
                    foreach ($elem['data'] as $key => $item) {
1143
                        $tmp[$key] = $item;
1144
                    }
1145
                }
1146
                $simple_sub_tree[] = $tmp;
1147
            }
1148
            return $simple_sub_tree;