Test Failed
Push — master ( 8d1c8b...3b517b )
by Joe
02:20
created
src/Parallels.php 1 patch
Upper-Lower-Casing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  */
22 22
 class Parallels {
23 23
 	public $licenseType = 'billing'; // billing or purchase
24
-	private $xmlOptions = ['sslverify' => FALSE];
24
+	private $xmlOptions = ['sslverify' => false];
25 25
 	private $defaultUrl = 'https://ka.parallels.com:7050/';
26 26
 	private $defaultDemoUrl = 'https://kademo.parallels.com:7050/';
27 27
 	public $url = '';
@@ -38,26 +38,26 @@  discard block
 block discarded – undo
38 38
 	 * @param bool $demo defaults to FALSE, whether or not to use the demo interface instae dof the normal one
39 39
 	 * @param NULL|array $xmlOptions array of optoins ot pass to xmlrpc2 client
40 40
 	 */
41
-	public function __construct($login = NULL, $password = NULL, $client = NULL, $demo = FALSE, $xmlOptions = NULL) {
42
-		if (NULL === $login && defined('PARALLELS_KA_LOGIN'))
41
+	public function __construct($login = null, $password = null, $client = null, $demo = false, $xmlOptions = null) {
42
+		if (null === $login && defined('PARALLELS_KA_LOGIN'))
43 43
 			$this->login = constant('PARALLELS_KA_LOGIN');
44 44
 		else
45 45
 			$this->login = $login;
46
-		if (NULL === $password && defined('PARALLELS_KA_PASSWORD'))
46
+		if (null === $password && defined('PARALLELS_KA_PASSWORD'))
47 47
 			$this->password = constant('PARALLELS_KA_PASSWORD');
48 48
 		else
49 49
 			$this->password = $password;
50
-		if (NULL !== $client)
50
+		if (null !== $client)
51 51
 			$this->client = $client;
52 52
 		elseif (defined('PARALLELS_KA_CLIENT'))
53 53
 			$this->client = constant('PARALLELS_KA_CLIENT');
54
-		if ($demo === TRUE)
54
+		if ($demo === true)
55 55
 			$this->url = $this->defaultDemoUrl;
56
-		elseif ($demo === FALSE)
56
+		elseif ($demo === false)
57 57
 			$this->url = $this->defaultUrl;
58 58
 		else
59 59
 			$this->url = $demo;
60
-		if (NULL !== $xmlOptions)
60
+		if (null !== $xmlOptions)
61 61
 			$this->xmlOptions = $xmlOptions;
62 62
 		require_once 'XML/RPC2/Client.php';
63 63
 		$this->xml = \XML_RPC2_Client::create($this->url, $this->xmlOptions);
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 	 * @param bool $email
129 129
 	 * @return mixed
130 130
 	 */
131
-	public function sendKeyByEmail($key, $email = FALSE) {
132
-		if ($email === FALSE)
131
+	public function sendKeyByEmail($key, $email = false) {
132
+		if ($email === false)
133 133
 			$this->response = $this->xml->__call('partner10.sendKeyByEmail', [$this->authInfo(), $key]);
134 134
 		else
135 135
 			$this->response = $this->xml->__call('partner10.sendKeyByEmail', [$this->authInfo(), $key, $email]);
@@ -145,14 +145,14 @@  discard block
 block discarded – undo
145 145
 	 * @param bool  $client
146 146
 	 * @return mixed
147 147
 	 */
148
-	public function createKey($keyType, $upgradePlans = [], $ips = [], $macs = [], $licenseType = FALSE, $client = FALSE) {
148
+	public function createKey($keyType, $upgradePlans = [], $ips = [], $macs = [], $licenseType = false, $client = false) {
149 149
 		if (!is_array($ips) && $ips != '')
150 150
 			$ips = [$ips];
151 151
 		$this->response = $this->xml->__call('partner10.createKey', [
152 152
 																	  $this->authInfo(),
153
-																	  $this->serverAddress($ips, $macs), $client === FALSE ? $this->client : $client,
153
+																	  $this->serverAddress($ips, $macs), $client === false ? $this->client : $client,
154 154
 																	  $keyType,
155
-																	  $upgradePlans, $licenseType === FALSE ? $this->licenseType : $licenseType
155
+																	  $upgradePlans, $licenseType === false ? $this->licenseType : $licenseType
156 156
 		]
157 157
 		);
158 158
 		return $this->response;
@@ -531,18 +531,18 @@  discard block
 block discarded – undo
531 531
 	public function getMainKeyFromIp($ipAddress) {
532 532
 		$response = $this->getKeyNumbers($ipAddress);
533 533
 		//$response = $this->getKeysInfoByIP($ipAddress);
534
-		$return = FALSE;
534
+		$return = false;
535 535
 		if (isset($response['keyInfos'])) {
536 536
 			$responseValues = array_values($response['keyInfos']);
537 537
 			foreach ($responseValues as $data) {
538
-				if ($return === FALSE)
538
+				if ($return === false)
539 539
 					$return = $data['keyNumber'];
540 540
 				if ($data['type'] == 'MAIN')
541 541
 					$return = $data['keyNumber'];
542 542
 			}
543 543
 			return $return;
544 544
 		} else
545
-			return FALSE;
545
+			return false;
546 546
 	}
547 547
 
548 548
 	/**
@@ -688,8 +688,8 @@  discard block
 block discarded – undo
688 688
 	 * @param bool $client
689 689
 	 * @return mixed
690 690
 	 */
691
-	public function getAvailableKeyTypesAndFeatures($client = FALSE) {
692
-		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', [$this->authInfo(), $client === FALSE ? $this->client : $client]);
691
+	public function getAvailableKeyTypesAndFeatures($client = false) {
692
+		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', [$this->authInfo(), $client === false ? $this->client : $client]);
693 693
 		return $this->response;
694 694
 		/* My Output:
695 695
 		Array
Please login to merge, or discard this patch.