Completed
Pull Request — master (#10)
by Glenn
02:07
created
examples/sites/getSites.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-     $site = $client->site()->getAll();
18
+    try {
19
+        $site = $client->site()->getAll();
20 20
     // Show result
21
-     echo "<pre>";
22
-     print_r($site);
23
-     echo "</pre>";
24
- } catch (\PleskX\API\Client\Exception $e) {
25
-     echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
- }
21
+        echo "<pre>";
22
+        print_r($site);
23
+        echo "</pre>";
24
+    } catch (\PleskX\API\Client\Exception $e) {
25
+        echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
+    }
Please login to merge, or discard this patch.
examples/customers/createCustomer.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,15 +8,15 @@  discard block
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-     $customer = $client->customer()->create(array(
18
+    try {
19
+        $customer = $client->customer()->create(array(
20 20
     'cname'   => 'Example',
21 21
     'pname'   => 'Example customer',
22 22
     'login'   => 'example',
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
     'state'   => '',
31 31
     'pcode'   => '',
32 32
     'country' => 'CA'
33
-  ));
33
+    ));
34 34
 
35
-     // Show result
36
-     echo "<pre>";
37
-     print_r($customer);
38
-     echo "</pre>";
39
- } catch (\PleskX\API\Client\Exception $e) {
40
-     echo 'Please verify your credentials. Make sure to change the $host, $login, and $password variables in this file.';
41
- }
35
+        // Show result
36
+        echo "<pre>";
37
+        print_r($customer);
38
+        echo "</pre>";
39
+    } catch (\PleskX\API\Client\Exception $e) {
40
+        echo 'Please verify your credentials. Make sure to change the $host, $login, and $password variables in this file.';
41
+    }
Please login to merge, or discard this patch.
examples/customers/getCustomers.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-     $customer = $client->customer()->getAll();
18
+    try {
19
+        $customer = $client->customer()->getAll();
20 20
     // Show result
21
-     echo "<pre>";
22
-     print_r($customer);
23
-     echo "</pre>";
24
- } catch (\PleskX\API\Client\Exception $e) {
25
-     echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
- }
21
+        echo "<pre>";
22
+        print_r($customer);
23
+        echo "</pre>";
24
+    } catch (\PleskX\API\Client\Exception $e) {
25
+        echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
+    }
Please login to merge, or discard this patch.
examples/server/getKeyInfo.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-      $server = $client->server()->getKeyInfo();
20
-      // Show result
21
-     echo "<pre>";
22
-     print_r($server);
23
-     echo "</pre>";
24
-   } catch (\PleskX\API\Client\Exception $e) {
25
-     echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
- }
18
+    try {
19
+        $server = $client->server()->getKeyInfo();
20
+        // Show result
21
+        echo "<pre>";
22
+        print_r($server);
23
+        echo "</pre>";
24
+    } catch (\PleskX\API\Client\Exception $e) {
25
+        echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
+    }
Please login to merge, or discard this patch.
examples/server/getServiceStates.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-     $server = $client->server()->getServiceStates();
18
+    try {
19
+        $server = $client->server()->getServiceStates();
20 20
     // Show result
21
-     echo "<pre>";
22
-     print_r($server);
23
-     echo "</pre>";
24
- } catch (\PleskX\API\Client\Exception $e) {
25
-     echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
- }
21
+        echo "<pre>";
22
+        print_r($server);
23
+        echo "</pre>";
24
+    } catch (\PleskX\API\Client\Exception $e) {
25
+        echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
+    }
Please login to merge, or discard this patch.
examples/server/getStatistics.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-      $stats = $client->server()->getStatistics();
20
-      // Show result
21
-     echo "<pre>";
22
-     print_r($stats);
23
-     echo "</pre>";
24
-   } catch (\PleskX\API\Client\Exception $e) {
25
-     echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
- }
18
+    try {
19
+        $stats = $client->server()->getStatistics();
20
+        // Show result
21
+        echo "<pre>";
22
+        print_r($stats);
23
+        echo "</pre>";
24
+    } catch (\PleskX\API\Client\Exception $e) {
25
+        echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
+    }
Please login to merge, or discard this patch.
examples/server/getUpdatesInfo.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-      $update = $client->server()->getUpdatesInfo();
20
-      // Show result
21
-     echo "<pre>";
22
-     print_r($update);
23
-     echo "</pre>";
24
-   } catch (\PleskX\API\Client\Exception $e) {
25
-     echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
- }
18
+    try {
19
+        $update = $client->server()->getUpdatesInfo();
20
+        // Show result
21
+        echo "<pre>";
22
+        print_r($update);
23
+        echo "</pre>";
24
+    } catch (\PleskX\API\Client\Exception $e) {
25
+        echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
+    }
Please login to merge, or discard this patch.
examples/server/getGeneralInfo.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-      $server = $client->server()->getGeneralInfo();
20
-      // Show result
21
-     echo "<pre>";
22
-     print_r($server);
23
-     echo "</pre>";
24
-   } catch (\PleskX\API\Client\Exception $e) {
25
-     echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
- }
18
+    try {
19
+        $server = $client->server()->getGeneralInfo();
20
+        // Show result
21
+        echo "<pre>";
22
+        print_r($server);
23
+        echo "</pre>";
24
+    } catch (\PleskX\API\Client\Exception $e) {
25
+        echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
+    }
Please login to merge, or discard this patch.
examples/serviceplans/getServiceplans.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  * Change the host, login, password below with your own.
9 9
  */
10 10
 
11
- $host     = "";
12
- $login    = "";
13
- $password = "";
11
+    $host     = "";
12
+    $login    = "";
13
+    $password = "";
14 14
 
15
- $client = new PleskApiClient($host);
16
- $client->setCredentials($login, $password);
15
+    $client = new PleskApiClient($host);
16
+    $client->setCredentials($login, $password);
17 17
 
18
- try {
19
-     $packages = $client->serviceplan()->getAll();
18
+    try {
19
+        $packages = $client->serviceplan()->getAll();
20 20
     // Show result
21
-     echo "<pre>";
22
-     print_r($packages);
23
-     echo "</pre>";
24
- } catch (\PleskX\API\Client\Exception $e) {
25
-     echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
- }
21
+        echo "<pre>";
22
+        print_r($packages);
23
+        echo "</pre>";
24
+    } catch (\PleskX\API\Client\Exception $e) {
25
+        echo 'Please check your credentials. Make sure to change the $host, $login, and $password variables in this file.';
26
+    }
Please login to merge, or discard this patch.