Code Duplication    Length = 11-11 lines in 2 locations

src/Cpanel.php 2 locations

@@ 122-132 (lines=11) @@
119
		return $this->get("XMLlicenseExpire.cgi", $args);
120
	}
121
122
	public function extendOnetimeUpdates($args) {
123
		if (!array_key_exists("ip", $args)) {
124
			error_log("cpanelLicensing::extendOnetimeUpdates requires that the element ip exists in the array is passed to it");
125
			return;
126
		}
127
		if (!$this->validateIP($args['ip'])) {
128
			error_log("cpanelLicensing::extendOnetimeUpdates was passed an invalid ip");
129
			return;
130
		}
131
		return $this->get("XMLonetimeext.cgi", $args);
132
	}
133
134
	public function changeip($args) {
135
		if (!array_key_exists("oldip", $args) || !array_key_exists("newip", $args)) {
@@ 219-229 (lines=11) @@
216
		return $this->get("XMLgroupInfo.cgi");
217
	}
218
219
	public function fetchLicenseRiskData($args) {
220
		if (!array_key_exists("ip", $args)) {
221
			error_log("cpanelLicensing::fetchLicenseRiskData requires that ip exists as an element in the array is passed to it");
222
			return;
223
		}
224
		if (!$this->validateIP($args['ip'])) {
225
			error_log("cpanelLicensing::fetchLicenseRiskData was passed an invalid ip");
226
			return;
227
		}
228
		return $this->get("XMLsecverify.cgi", $args);
229
	}
230
231
	public function fetchLicenseRaw($args) {
232
		$args = array_merge(array("all" => 1), $args);