Code Duplication    Length = 10-10 lines in 2 locations

core/Profile.php 2 locations

@@ 240-249 (lines=10) @@
237
        }
238
        // pick all attributes which are profile specific and place into final array if no eap/device-specific exists
239
240
        foreach ($temparray as $attrib) {
241
            if ($attrib["level"] == "Profile") {
242
                $ignore = "";
243
                foreach ($this->attributes as $approved_attrib) {
244
                    if ($attrib["name"] == $approved_attrib["name"] && $approved_attrib["level"] != "IdP" && $approved_attrib["level"] != "Profile") {
245
                        $ignore = "YES";
246
                    }
247
                }
248
                if ($ignore != "YES") {
249
                    $this->attributes[] = $attrib;
250
                }
251
            }
252
        }
@@ 256-265 (lines=10) @@
253
254
        // now, add IdP-wide attribs
255
256
        foreach ($temparray as $attrib) {
257
            if ($attrib["level"] == "IdP") {
258
                $ignore = "";
259
                foreach ($this->attributes as $approved_attrib) {
260
                    if ($attrib["name"] == $approved_attrib["name"] && $approved_attrib["level"] != "IdP") {
261
                        $ignore = "YES";
262
                    }
263
                }
264
                if ($ignore != "YES") {
265
                    $this->attributes[] = $attrib;
266
                }
267
            }
268
        }