Code Duplication    Length = 3-3 lines in 2 locations

core/UserNetAPI.php 2 locations

@@ 87-89 (lines=3) @@
84
    public function JSON_listIdentityProviders($country) {
85
        $idps = $this->listAllIdentityProviders(1, $country);
86
        $returnArray = [];
87
        foreach ($idps as $idp) {
88
            $returnArray[] = ['idp' => $idp['entityID'], 'display' => $idp['title']];
89
        }
90
        echo $this->returnJSON($returnArray);
91
    }
92
@@ 118-120 (lines=3) @@
115
    public function JSON_orderIdentityProviders($country, $location = NULL) {
116
        $idps = $this->orderIdentityProviders($country, $location);
117
        $returnArray = [];
118
        foreach ($idps as $idp) {
119
            $returnArray[] = ['idp' => $idp['id'], 'display' => $idp['title']];
120
        }
121
        echo $this->returnJSON($returnArray);
122
    }
123