Test Failed
Push — master ( de741a...659c33 )
by Joe
05:15
created
src/LiteSpeed.php 1 patch
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  *
15 15
  * @access public
16 16
  */
17
-class LiteSpeed
18
-{
17
+class LiteSpeed {
19 18
 	public $login = '';
20 19
 	public $password = '';
21 20
 	public $usePost = true;
@@ -33,16 +32,14 @@  discard block
 block discarded – undo
33 32
 	 * @param $login
34 33
 	 * @param $password
35 34
 	 */
36
-	public function __construct($login, $password)
37
-	{
35
+	public function __construct($login, $password) {
38 36
 		$this->login = $login;
39 37
 		$this->password = $password;
40 38
 		$this->resetParams();
41 39
 		function_requirements('xml2array');
42 40
 	}
43 41
 
44
-	public function resetParams()
45
-	{
42
+	public function resetParams() {
46 43
 		$this->params = [];
47 44
 		$this->params['litespeed_store_login'] = rawurlencode($this->login);
48 45
 		$this->params['litespeed_store_pass'] = rawurlencode($this->password);
@@ -52,8 +49,7 @@  discard block
 block discarded – undo
52 49
 	/**
53 50
 	 * @return mixed
54 51
 	 */
55
-	public function ping()
56
-	{
52
+	public function ping() {
57 53
 		return $this->req('Ping');
58 54
 	}
59 55
 
@@ -126,8 +122,7 @@  discard block
 block discarded – undo
126 122
 	 * 			),
127 123
 	 * 		)
128 124
 	 */
129
-	public function order($product, $cpu = false, $period = 'monthly', $payment = 'credit', $cvv = false, $promocode = false)
130
-	{
125
+	public function order($product, $cpu = false, $period = 'monthly', $payment = 'credit', $cvv = false, $promocode = false) {
131 126
 		if (!in_array($product, $this->validProducts)) {
132 127
 			return ['error' => 'Invalid Product'];
133 128
 		}
@@ -162,8 +157,7 @@  discard block
 block discarded – undo
162 157
 	 * @param bool   $reason
163 158
 	 * @return mixed
164 159
 	 */
165
-	public function cancel($serial = false, $ipAddress = false, $now = 'Y', $reason = false)
166
-	{
160
+	public function cancel($serial = false, $ipAddress = false, $now = 'Y', $reason = false) {
167 161
 		$this->params['license_serial'] = $serial;
168 162
 		$this->params['server_ip'] = $ipAddress;
169 163
 		$this->params['cancel_now'] = $now;
@@ -176,8 +170,7 @@  discard block
 block discarded – undo
176 170
 	 * @param $ipAddress
177 171
 	 * @return mixed
178 172
 	 */
179
-	public function release($serial, $ipAddress)
180
-	{
173
+	public function release($serial, $ipAddress) {
181 174
 		$this->params['license_serial'] = $serial;
182 175
 		$this->params['server_ip'] = $ipAddress;
183 176
 		return $this->req('ReleaseLicense');
@@ -197,8 +190,7 @@  discard block
 block discarded – undo
197 190
 	 * @param mixed $reason optional reason for suspend/unsuspend
198 191
 	 * @return mixed
199 192
 	 */
200
-	public function suspend($serial = false, $ipAddress = false, $reason = false)
201
-	{
193
+	public function suspend($serial = false, $ipAddress = false, $reason = false) {
202 194
 		if ($serial !== false) {
203 195
 			$this->params['license_serial'] = $serial;
204 196
 		}
@@ -219,8 +211,7 @@  discard block
 block discarded – undo
219 211
 	 * @param mixed $reason optional reason for suspend/unsuspend
220 212
 	 * @return mixed
221 213
 	 */
222
-	public function unsuspend($serial = false, $ipAddress = false, $reason = false)
223
-	{
214
+	public function unsuspend($serial = false, $ipAddress = false, $reason = false) {
224 215
 		if ($serial !== false) {
225 216
 			$this->params['license_serial'] = $serial;
226 217
 		}
@@ -241,8 +232,7 @@  discard block
 block discarded – undo
241 232
 	 * @param bool   $cvv
242 233
 	 * @return array|mixed
243 234
 	 */
244
-	public function upgrade($serial = false, $ipAddress = false, $cpu, $payment = 'credit', $cvv = false)
245
-	{
235
+	public function upgrade($serial = false, $ipAddress = false, $cpu, $payment = 'credit', $cvv = false) {
246 236
 		if ($serial !== false) {
247 237
 			$this->params['license_serial'] = $serial;
248 238
 		}
@@ -267,8 +257,7 @@  discard block
 block discarded – undo
267 257
 	 * @param $field
268 258
 	 * @return mixed
269 259
 	 */
270
-	public function query($field)
271
-	{
260
+	public function query($field) {
272 261
 		/**
273 262
 		 * query_field – Currently supported values:
274 263
 		 *	 	“AllActiveLicenses”
@@ -295,8 +284,7 @@  discard block
 block discarded – undo
295 284
 	 *
296 285
 	 * @param mixed $post TRUE for POST , FALSE for GET requests		*
297 286
 	 */
298
-	public function usePost($post = true)
299
-	{
287
+	public function usePost($post = true) {
300 288
 		$this->usePost = $post;
301 289
 	}
302 290
 
@@ -306,8 +294,7 @@  discard block
 block discarded – undo
306 294
 	 * @param string $action Can be one of Ping, Order, Cancel, ReleaseLicense, Suspend, Unsuspend, Upgrade, or Query
307 295
 	 * @return mixed
308 296
 	 */
309
-	public function req($action)
310
-	{
297
+	public function req($action) {
311 298
 		$this->params['eService_action'] = rawurlencode($action);
312 299
 		// Set the curl parameters.
313 300
 		$ch = curl_init();
@@ -357,8 +344,7 @@  discard block
 block discarded – undo
357 344
 	 * @param mixed $response the response from an a function/api command
358 345
 	 * @return void
359 346
 	 */
360
-	public function displayResponse($response)
361
-	{
347
+	public function displayResponse($response) {
362 348
 		if (empty($response)) {
363 349
 			$response = $this->error;
364 350
 		}
Please login to merge, or discard this patch.