Code Duplication    Length = 11-11 lines in 2 locations

src/Cloudlinux.php 2 locations

@@ 189-199 (lines=11) @@
186
	 * @param bool $checkAll True will search for any type of license. False ­ only for types 1 or 2
187
	 * @return false|array (list<int>): List of registered license types or empty list if no license found
188
	 */
189
	public function xmlIsLicensed($ipAddress, $checkAll = true) {
190
		$xmlClient = $this->xmlClient;
191
		try {
192
			$this->response = $xmlClient->is_licensed($this->authToken(), $ipAddress, $checkAll);
193
		} catch (\Exception $e) {
194
			$this->log('error', 'Caught exception code: ' . $e->getCode());
195
			$this->log('error', 'Caught exception message: ' . $e->getMessage());
196
			return false;
197
		}
198
		return $this->response;
199
	}
200
201
	/**
202
	 * Will register IP based license for authorized user.
@@ 310-320 (lines=11) @@
307
	 * @throws XmlRpcException for critical errors
308
	 * @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
309
	 */
310
	public function reconcile() {
311
		$xmlClient = $this->xmlClient;
312
		try {
313
			$this->response = $xmlClient->reconcile($this->authToken());
314
		} catch (\Exception $e) {
315
			$this->log('error', 'Caught exception code: ' . $e->getCode());
316
			$this->log('error', 'Caught exception message: ' . $e->getMessage());
317
			return false;
318
		}
319
		return $this->response;
320
	}
321
322
	/**
323
	 * Register new IP license.