Code Duplication    Length = 10-10 lines in 4 locations

plugins/cpanel-change-password/xmlapi.php 4 locations

@@ 1317-1326 (lines=10) @@
1314
    * @return mixed
1315
    * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AddDNSZone XML API Call documentation
1316
    */
1317
    public function adddns($domain, $ip)
1318
    {
1319
        if (!isset($domain) || !isset($ip)) {
1320
            error_log("adddns require that domain, ip are passed to it");
1321
1322
            return false;
1323
        }
1324
1325
        return $this->xmlapi_query('adddns', array('domain' => $domain, 'ip' => $ip));
1326
    }
1327
1328
    /**
1329
    * Add a record to a zone
@@ 1479-1488 (lines=10) @@
1476
    * @param int $line The line to remove from the zone
1477
    * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/RemoveZone XML API Call documentation
1478
    */
1479
    public function removezonerecord($zone, $line)
1480
    {
1481
        if ( !isset($zone) || !isset($line) ) {
1482
            error_log("removezone record requires that a zone and line number is passed to it");
1483
1484
            return false;
1485
        }
1486
1487
        return $this->xmlapi_query('removezonerecord', array('zone' => $zone, 'Line' => $line) );
1488
    }
1489
1490
    /**
1491
    * Reset a zone
@@ 1808-1817 (lines=10) @@
1805
    * @return mixed
1806
    * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetResellerMainIp XML API Call documentation
1807
    */
1808
    public function setresellermainip($reseller, $ip)
1809
    {
1810
        if ( !isset($reseller) || !isset($ip) ) {
1811
            error_log("setresellermainip requires that an reseller and ip are passed to it");
1812
1813
            return false;
1814
        }
1815
1816
        return $this->xmlapi_query("setresellermainip", array('user' => $reseller, 'ip' => $ip));
1817
    }
1818
1819
    /**
1820
    * Set reseller package limits
@@ 2037-2046 (lines=10) @@
2034
    * @return mixed
2035
    * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AddIPAddress XML API Call documentation
2036
    */
2037
    public function addip($ip, $netmask)
2038
    {
2039
        if (!isset($ip) || !isset($netmask)) {
2040
            error_log("addip requires that an IP address and Netmask are passed to it");
2041
2042
            return false;
2043
        }
2044
2045
        return $this->xmlapi_query('addip', array('ip' => $ip, 'netmask' => $netmask));
2046
    }
2047
2048
    // This function allows you to delete an IP address from your server.
2049
    /**