| @@ -19,8 +19,7 @@ | ||
| 19 | 19 | * | 
| 20 | 20 | * @access public | 
| 21 | 21 | */ | 
| 22 | -class Parallels | |
| 23 | -{ | |
| 22 | +class Parallels { | |
| 24 | 23 | public $LicenseType = 'billing'; // billing or purchase | 
| 25 | 24 |  	private $xmlOptions = array('sslverify' => false); | 
| 26 | 25 | private $default_url = 'https://ka.parallels.com:7050/'; | 
| @@ -22,7 +22,7 @@ discard block | ||
| 22 | 22 | class Parallels | 
| 23 | 23 |  { | 
| 24 | 24 | public $LicenseType = 'billing'; // billing or purchase | 
| 25 | -	private $xmlOptions = array('sslverify' => false); | |
| 25 | +	private $xmlOptions = array('sslverify' => FALSE); | |
| 26 | 26 | private $default_url = 'https://ka.parallels.com:7050/'; | 
| 27 | 27 | private $default_demo_url = 'https://kademo.parallels.com:7050/'; | 
| 28 | 28 | public $url = ''; | 
| @@ -39,7 +39,7 @@ discard block | ||
| 39 | 39 | * @param bool $demo defaults to false, whether or not to use the demo interface instae dof the normal one | 
| 40 | 40 | * @param null|array $xmlOptions array of optoins ot pass to xmlrpc2 client | 
| 41 | 41 | */ | 
| 42 | -	public function __construct($login = null, $password = null, $client = null, $demo = false, $xmlOptions = null) { | |
| 42 | +	public function __construct($login = NULL, $password = NULL, $client = NULL, $demo = FALSE, $xmlOptions = NULL) { | |
| 43 | 43 |  		if (is_null($login) && defined('PARALLELS_KA_LOGIN')) | 
| 44 | 44 |  			$this->login = constant('PARALLELS_KA_LOGIN'); | 
| 45 | 45 | else | 
| @@ -52,9 +52,9 @@ discard block | ||
| 52 | 52 | $this->client = $client; | 
| 53 | 53 |  		elseif (defined('PARALLELS_KA_CLIENT')) | 
| 54 | 54 |  			$this->client = constant('PARALLELS_KA_CLIENT'); | 
| 55 | - if ($demo === true) | |
| 55 | + if ($demo === TRUE) | |
| 56 | 56 | $this->url = $this->default_demo_url; | 
| 57 | - elseif ($demo === false) | |
| 57 | + elseif ($demo === FALSE) | |
| 58 | 58 | $this->url = $this->default_url; | 
| 59 | 59 | else | 
| 60 | 60 | $this->url = $demo; | 
| @@ -131,8 +131,8 @@ discard block | ||
| 131 | 131 | * @param bool $Email | 
| 132 | 132 | * @return mixed | 
| 133 | 133 | */ | 
| 134 | -	public function sendKeyByEmail($Key, $Email = false) { | |
| 135 | - if ($Email === false) | |
| 134 | +	public function sendKeyByEmail($Key, $Email = FALSE) { | |
| 135 | + if ($Email === FALSE) | |
| 136 | 136 |  			$this->response = $this->xml->__call('partner10.sendKeyByEmail', array($this->AuthInfo(), $Key)); | 
| 137 | 137 | else | 
| 138 | 138 |  			$this->response = $this->xml->__call('partner10.sendKeyByEmail', array($this->AuthInfo(), $Key, $Email)); | 
| @@ -148,16 +148,16 @@ discard block | ||
| 148 | 148 | * @param bool $client | 
| 149 | 149 | * @return mixed | 
| 150 | 150 | */ | 
| 151 | -	public function createKey($KeyType, $UpgradePlans = array(), $ips = array(), $macs = array(), $LicenseType = false, $client = false) { | |
| 151 | +	public function createKey($KeyType, $UpgradePlans = array(), $ips = array(), $macs = array(), $LicenseType = FALSE, $client = FALSE) { | |
| 152 | 152 | if (!is_array($ips) && $ips != '') | 
| 153 | 153 | $ips = array($ips); | 
| 154 | 154 |  		$this->response = $this->xml->__call('partner10.createKey', array( | 
| 155 | 155 | $this->AuthInfo(), | 
| 156 | 156 | $this->ServerAddress($ips, $macs), | 
| 157 | - ($client === false ? $this->client : $client), | |
| 157 | + ($client === FALSE ? $this->client : $client), | |
| 158 | 158 | $KeyType, | 
| 159 | 159 | $UpgradePlans, | 
| 160 | - ($LicenseType === false ? $this->LicenseType : $LicenseType))); | |
| 160 | + ($LicenseType === FALSE ? $this->LicenseType : $LicenseType))); | |
| 161 | 161 | return $this->response; | 
| 162 | 162 | /* Success: | 
| 163 | 163 | Array | 
| @@ -534,17 +534,17 @@ discard block | ||
| 534 | 534 |  	public function getMainKeyFromIp($ip) { | 
| 535 | 535 | $response = $this->getKeyNumbers($ip); | 
| 536 | 536 | //$response = $this->getKeysInfoByIP($ip); | 
| 537 | - $return = false; | |
| 537 | + $return = FALSE; | |
| 538 | 538 |  		if (isset($response['keyInfos'])) { | 
| 539 | 539 |  			foreach ($response['keyInfos'] as $idx => $data) { | 
| 540 | - if ($return === false) | |
| 540 | + if ($return === FALSE) | |
| 541 | 541 | $return = $data['keyNumber']; | 
| 542 | 542 | if ($data['type'] == 'MAIN') | 
| 543 | 543 | $return = $data['keyNumber']; | 
| 544 | 544 | } | 
| 545 | 545 | return $return; | 
| 546 | 546 | } else | 
| 547 | - return false; | |
| 547 | + return FALSE; | |
| 548 | 548 | } | 
| 549 | 549 | |
| 550 | 550 | /** | 
| @@ -690,8 +690,8 @@ discard block | ||
| 690 | 690 | * @param bool $client | 
| 691 | 691 | * @return mixed | 
| 692 | 692 | */ | 
| 693 | -	public function getAvailableKeyTypesAndFeatures($client = false) { | |
| 694 | -		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', array($this->AuthInfo(), ($client === false ? $this->client : $client))); | |
| 693 | +	public function getAvailableKeyTypesAndFeatures($client = FALSE) { | |
| 694 | +		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', array($this->AuthInfo(), ($client === FALSE ? $this->client : $client))); | |
| 695 | 695 | return $this->response; | 
| 696 | 696 | /* My Output: | 
| 697 | 697 | Array |