Code Duplication    Length = 11-11 lines in 2 locations

src/Cloudlinux.php 2 locations

@@ 170-180 (lines=11) @@
167
	 * @param bool $checkAll True will search for any type of license. False ­ only for types 1 or 2
168
	 * @return false|array (list<int>): List of registered license types or empty list if no license found
169
	 */
170
	public function xmlIsLicensed($ipAddress, $checkAll = true) {
171
		$xmlClient = $this->xmlClient;
172
		try {
173
			$this->response = $xmlClient->is_licensed($this->authToken(), $ipAddress, $checkAll);
174
		} catch (\Exception $e) {
175
			$this->log('error', 'Caught exception code: ' . $e->getCode());
176
			$this->log('error', 'Caught exception message: ' . $e->getMessage());
177
			return false;
178
		}
179
		return $this->response;
180
	}
181
182
	/**
183
	 * Will register IP based license for authorized user.
@@ 282-292 (lines=11) @@
279
	 * @throws XmlRpcException for critical errors
280
	 * @return false|array (list<structure>): List of structures or empty list. Each structure contains keys:  IP(string)   TYPE(int) ­ license type  REGISTERED(boolean) ­ True if server was registered in CLN with this license
281
	 */
282
	public function reconcile() {
283
		$xmlClient = $this->xmlClient;
284
		try {
285
			$this->response = $xmlClient->reconcile($this->authToken());
286
		} catch (\Exception $e) {
287
			$this->log('error', 'Caught exception code: ' . $e->getCode());
288
			$this->log('error', 'Caught exception message: ' . $e->getMessage());
289
			return false;
290
		}
291
		return $this->response;
292
	}
293
294
	/**
295
	 * alias function to get a list of licenses