Code Duplication    Length = 12-12 lines in 2 locations

classes/DomainMOD/OpenSrs.php 2 locations

@@ 143-154 (lines=12) @@
140
        $domain_list = array();
141
        $domain_count = 0;
142
143
        if ($api_call_status == '1') {
144
145
            foreach(preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
146
147
                if (preg_match('/<item key="name">(.*)<\/item>/', $xml_line, $match)) {
148
                    $domain_list[] = $match[1];
149
                    $domain_count++;
150
                }
151
152
            }
153
154
        }
155
        return array($domain_count, $domain_list);
156
    }
157
@@ 201-212 (lines=12) @@
198
199
        $privacy_status = '';
200
201
        if ($api_call_status == '1') {
202
203
            foreach(preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
204
205
                // get privacy status
206
                if (preg_match('/<item key="state">(.*)<\/item>/', $xml_line, $match)) {
207
                    $privacy_status = $this->processPrivacy($match[1]);
208
                }
209
210
            }
211
212
        }
213
        return array($expiration_date, $dns_servers, $privacy_status, $autorenewal_status);
214
215
    }