@@ -30,8 +30,7 @@ discard block |
||
30 | 30 | if ($format != "xml" && $format != "json" && $format != "yaml" && $format != "simplexml") { |
31 | 31 | error_log("set_format requires that the format is xml, json, yaml or simplexml"); |
32 | 32 | return; |
33 | - } |
|
34 | - else { |
|
33 | + } else { |
|
35 | 34 | $this->format = $format; |
36 | 35 | } |
37 | 36 | } |
@@ -62,8 +61,7 @@ discard block |
||
62 | 61 | $result = $result[str_replace('.cgi', '', $function)]; |
63 | 62 | $result = $this->format_result($result); |
64 | 63 | return $result; |
65 | - } |
|
66 | - else { |
|
64 | + } else { |
|
67 | 65 | return $result; |
68 | 66 | } |
69 | 67 | } |
@@ -86,8 +84,7 @@ discard block |
||
86 | 84 | private function validateID ($id) { |
87 | 85 | if (preg_match("/^(L|P|G)?\d*$/", $id)) { |
88 | 86 | return 1; |
89 | - } |
|
90 | - else { |
|
87 | + } else { |
|
91 | 88 | return 0; |
92 | 89 | } |
93 | 90 | } |
@@ -271,11 +268,9 @@ discard block |
||
271 | 268 | $xml_obj = (array) $xml_obj; |
272 | 269 | if (array_key_exists("packages", $xml_obj)) { |
273 | 270 | $type = "packages"; |
274 | - } |
|
275 | - else if (array_key_exists("groups", $xml_obj)) { |
|
271 | + } else if (array_key_exists("groups", $xml_obj)) { |
|
276 | 272 | $type = "groups"; |
277 | - } |
|
278 | - else { |
|
273 | + } else { |
|
279 | 274 | error_log("cPanelLicensing::findKey with an object that is not groups or packages"); |
280 | 275 | return; |
281 | 276 | } |
@@ -2,8 +2,7 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * Generated by PHPUnit_SkeletonGenerator on 2017-06-16 at 14:19:40. |
4 | 4 | */ |
5 | -class CpanelTest extends PHPUnit_Framework_TestCase |
|
6 | -{ |
|
5 | +class CpanelTest extends PHPUnit_Framework_TestCase { |
|
7 | 6 | /** |
8 | 7 | * @var Cpanel |
9 | 8 | */ |
@@ -13,8 +12,7 @@ discard block |
||
13 | 12 | * Sets up the fixture, for example, opens a network connection. |
14 | 13 | * This method is called before a test is executed. |
15 | 14 | */ |
16 | - protected function setUp() |
|
17 | - { |
|
15 | + protected function setUp() { |
|
18 | 16 | $this->object = new Cpanel; |
19 | 17 | } |
20 | 18 | |
@@ -22,16 +20,14 @@ discard block |
||
22 | 20 | * Tears down the fixture, for example, closes a network connection. |
23 | 21 | * This method is called after a test is executed. |
24 | 22 | */ |
25 | - protected function tearDown() |
|
26 | - { |
|
23 | + protected function tearDown() { |
|
27 | 24 | } |
28 | 25 | |
29 | 26 | /** |
30 | 27 | * @covers Detain\Cpanel\Cpanel::setopt |
31 | 28 | * @todo Implement testSetopt(). |
32 | 29 | */ |
33 | - public function testSetopt() |
|
34 | - { |
|
30 | + public function testSetopt() { |
|
35 | 31 | // Remove the following lines when you implement this test. |
36 | 32 | $this->markTestIncomplete( |
37 | 33 | 'This test has not been implemented yet.' |
@@ -42,8 +38,7 @@ discard block |
||
42 | 38 | * @covers Detain\Cpanel\Cpanel::setCredentials |
43 | 39 | * @todo Implement testSetCredentials(). |
44 | 40 | */ |
45 | - public function testSetCredentials() |
|
46 | - { |
|
41 | + public function testSetCredentials() { |
|
47 | 42 | // Remove the following lines when you implement this test. |
48 | 43 | $this->markTestIncomplete( |
49 | 44 | 'This test has not been implemented yet.' |
@@ -54,8 +49,7 @@ discard block |
||
54 | 49 | * @covers Detain\Cpanel\Cpanel::set_format |
55 | 50 | * @todo Implement testSet_format(). |
56 | 51 | */ |
57 | - public function testSet_format() |
|
58 | - { |
|
52 | + public function testSet_format() { |
|
59 | 53 | // Remove the following lines when you implement this test. |
60 | 54 | $this->markTestIncomplete( |
61 | 55 | 'This test has not been implemented yet.' |
@@ -66,8 +60,7 @@ discard block |
||
66 | 60 | * @covers Detain\Cpanel\Cpanel::reactivateLicense |
67 | 61 | * @todo Implement testReactivateLicense(). |
68 | 62 | */ |
69 | - public function testReactivateLicense() |
|
70 | - { |
|
63 | + public function testReactivateLicense() { |
|
71 | 64 | // Remove the following lines when you implement this test. |
72 | 65 | $this->markTestIncomplete( |
73 | 66 | 'This test has not been implemented yet.' |
@@ -78,8 +71,7 @@ discard block |
||
78 | 71 | * @covers Detain\Cpanel\Cpanel::expireLicense |
79 | 72 | * @todo Implement testExpireLicense(). |
80 | 73 | */ |
81 | - public function testExpireLicense() |
|
82 | - { |
|
74 | + public function testExpireLicense() { |
|
83 | 75 | // Remove the following lines when you implement this test. |
84 | 76 | $this->markTestIncomplete( |
85 | 77 | 'This test has not been implemented yet.' |
@@ -90,8 +82,7 @@ discard block |
||
90 | 82 | * @covers Detain\Cpanel\Cpanel::extendOnetimeUpdates |
91 | 83 | * @todo Implement testExtendOnetimeUpdates(). |
92 | 84 | */ |
93 | - public function testExtendOnetimeUpdates() |
|
94 | - { |
|
85 | + public function testExtendOnetimeUpdates() { |
|
95 | 86 | // Remove the following lines when you implement this test. |
96 | 87 | $this->markTestIncomplete( |
97 | 88 | 'This test has not been implemented yet.' |
@@ -102,8 +93,7 @@ discard block |
||
102 | 93 | * @covers Detain\Cpanel\Cpanel::changeip |
103 | 94 | * @todo Implement testChangeip(). |
104 | 95 | */ |
105 | - public function testChangeip() |
|
106 | - { |
|
96 | + public function testChangeip() { |
|
107 | 97 | // Remove the following lines when you implement this test. |
108 | 98 | $this->markTestIncomplete( |
109 | 99 | 'This test has not been implemented yet.' |
@@ -114,8 +104,7 @@ discard block |
||
114 | 104 | * @covers Detain\Cpanel\Cpanel::requestTransfer |
115 | 105 | * @todo Implement testRequestTransfer(). |
116 | 106 | */ |
117 | - public function testRequestTransfer() |
|
118 | - { |
|
107 | + public function testRequestTransfer() { |
|
119 | 108 | // Remove the following lines when you implement this test. |
120 | 109 | $this->markTestIncomplete( |
121 | 110 | 'This test has not been implemented yet.' |
@@ -126,8 +115,7 @@ discard block |
||
126 | 115 | * @covers Detain\Cpanel\Cpanel::activateLicense |
127 | 116 | * @todo Implement testActivateLicense(). |
128 | 117 | */ |
129 | - public function testActivateLicense() |
|
130 | - { |
|
118 | + public function testActivateLicense() { |
|
131 | 119 | // Remove the following lines when you implement this test. |
132 | 120 | $this->markTestIncomplete( |
133 | 121 | 'This test has not been implemented yet.' |
@@ -138,8 +126,7 @@ discard block |
||
138 | 126 | * @covers Detain\Cpanel\Cpanel::addPickupPass |
139 | 127 | * @todo Implement testAddPickupPass(). |
140 | 128 | */ |
141 | - public function testAddPickupPass() |
|
142 | - { |
|
129 | + public function testAddPickupPass() { |
|
143 | 130 | // Remove the following lines when you implement this test. |
144 | 131 | $this->markTestIncomplete( |
145 | 132 | 'This test has not been implemented yet.' |
@@ -150,8 +137,7 @@ discard block |
||
150 | 137 | * @covers Detain\Cpanel\Cpanel::registerAuth |
151 | 138 | * @todo Implement testRegisterAuth(). |
152 | 139 | */ |
153 | - public function testRegisterAuth() |
|
154 | - { |
|
140 | + public function testRegisterAuth() { |
|
155 | 141 | // Remove the following lines when you implement this test. |
156 | 142 | $this->markTestIncomplete( |
157 | 143 | 'This test has not been implemented yet.' |
@@ -162,8 +148,7 @@ discard block |
||
162 | 148 | * @covers Detain\Cpanel\Cpanel::fetchGroups |
163 | 149 | * @todo Implement testFetchGroups(). |
164 | 150 | */ |
165 | - public function testFetchGroups() |
|
166 | - { |
|
151 | + public function testFetchGroups() { |
|
167 | 152 | // Remove the following lines when you implement this test. |
168 | 153 | $this->markTestIncomplete( |
169 | 154 | 'This test has not been implemented yet.' |
@@ -174,8 +159,7 @@ discard block |
||
174 | 159 | * @covers Detain\Cpanel\Cpanel::fetchLicenseRiskData |
175 | 160 | * @todo Implement testFetchLicenseRiskData(). |
176 | 161 | */ |
177 | - public function testFetchLicenseRiskData() |
|
178 | - { |
|
162 | + public function testFetchLicenseRiskData() { |
|
179 | 163 | // Remove the following lines when you implement this test. |
180 | 164 | $this->markTestIncomplete( |
181 | 165 | 'This test has not been implemented yet.' |
@@ -186,8 +170,7 @@ discard block |
||
186 | 170 | * @covers Detain\Cpanel\Cpanel::fetchLicenseRaw |
187 | 171 | * @todo Implement testFetchLicenseRaw(). |
188 | 172 | */ |
189 | - public function testFetchLicenseRaw() |
|
190 | - { |
|
173 | + public function testFetchLicenseRaw() { |
|
191 | 174 | // Remove the following lines when you implement this test. |
192 | 175 | $this->markTestIncomplete( |
193 | 176 | 'This test has not been implemented yet.' |
@@ -198,8 +181,7 @@ discard block |
||
198 | 181 | * @covers Detain\Cpanel\Cpanel::fetchLicenseId |
199 | 182 | * @todo Implement testFetchLicenseId(). |
200 | 183 | */ |
201 | - public function testFetchLicenseId() |
|
202 | - { |
|
184 | + public function testFetchLicenseId() { |
|
203 | 185 | // Remove the following lines when you implement this test. |
204 | 186 | $this->markTestIncomplete( |
205 | 187 | 'This test has not been implemented yet.' |
@@ -210,8 +192,7 @@ discard block |
||
210 | 192 | * @covers Detain\Cpanel\Cpanel::fetchPackages |
211 | 193 | * @todo Implement testFetchPackages(). |
212 | 194 | */ |
213 | - public function testFetchPackages() |
|
214 | - { |
|
195 | + public function testFetchPackages() { |
|
215 | 196 | // Remove the following lines when you implement this test. |
216 | 197 | $this->markTestIncomplete( |
217 | 198 | 'This test has not been implemented yet.' |
@@ -222,8 +203,7 @@ discard block |
||
222 | 203 | * @covers Detain\Cpanel\Cpanel::fetchLicenses |
223 | 204 | * @todo Implement testFetchLicenses(). |
224 | 205 | */ |
225 | - public function testFetchLicenses() |
|
226 | - { |
|
206 | + public function testFetchLicenses() { |
|
227 | 207 | // Remove the following lines when you implement this test. |
228 | 208 | $this->markTestIncomplete( |
229 | 209 | 'This test has not been implemented yet.' |
@@ -234,8 +214,7 @@ discard block |
||
234 | 214 | * @covers Detain\Cpanel\Cpanel::fetchExpiredLicenses |
235 | 215 | * @todo Implement testFetchExpiredLicenses(). |
236 | 216 | */ |
237 | - public function testFetchExpiredLicenses() |
|
238 | - { |
|
217 | + public function testFetchExpiredLicenses() { |
|
239 | 218 | // Remove the following lines when you implement this test. |
240 | 219 | $this->markTestIncomplete( |
241 | 220 | 'This test has not been implemented yet.' |
@@ -246,8 +225,7 @@ discard block |
||
246 | 225 | * @covers Detain\Cpanel\Cpanel::findKey |
247 | 226 | * @todo Implement testFindKey(). |
248 | 227 | */ |
249 | - public function testFindKey() |
|
250 | - { |
|
228 | + public function testFindKey() { |
|
251 | 229 | // Remove the following lines when you implement this test. |
252 | 230 | $this->markTestIncomplete( |
253 | 231 | 'This test has not been implemented yet.' |