Code Duplication    Length = 10-10 lines in 2 locations

core/Profile.php 2 locations

@@ 259-268 (lines=10) @@
256
        }
257
        // pick all attributes which are profile specific and place into final array if no eap/device-specific exists
258
259
        foreach ($temparray as $attrib) {
260
            if ($attrib["level"] == "Profile") {
261
                $ignore = "";
262
                foreach ($this->attributes as $approved_attrib)
263
                    if ($attrib["name"] == $approved_attrib["name"] && $approved_attrib["level"] != "IdP" && $approved_attrib["level"] != "Profile")
264
                        $ignore = "YES";
265
                if ($ignore != "YES")
266
                    $this->attributes[] = $attrib;
267
            }
268
        }
269
270
        // now, add IdP-wide attribs
271
@@ 272-281 (lines=10) @@
269
270
        // now, add IdP-wide attribs
271
272
        foreach ($temparray as $attrib) {
273
            if ($attrib["level"] == "IdP") {
274
                $ignore = "";
275
                foreach ($this->attributes as $approved_attrib)
276
                    if ($attrib["name"] == $approved_attrib["name"] && $approved_attrib["level"] != "IdP")
277
                        $ignore = "YES";
278
                if ($ignore != "YES")
279
                    $this->attributes[] = $attrib;
280
            }
281
        }
282
283
        $this->name = getLocalisedValue($this->getAttributes('profile:name', 0, 0), $this->lang_index);
284