Test Failed
Push — master ( ff8da5...cc7d24 )
by Joe
02:43
created
src/Cpanel.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
tests/CpanelTest.php 1 patch
Braces   +21 added lines, -42 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
      * Sets up the fixture, for example, opens a network connection.
14 14
      * This method is called before a test is executed.
15 15
      */
16
-    protected function setUp()
17
-    {
16
+    protected function setUp() {
18 17
         $this->object = new Cpanel;
19 18
     }
20 19
 
@@ -22,16 +21,14 @@  discard block
 block discarded – undo
22 21
      * Tears down the fixture, for example, closes a network connection.
23 22
      * This method is called after a test is executed.
24 23
      */
25
-    protected function tearDown()
26
-    {
24
+    protected function tearDown() {
27 25
     }
28 26
 
29 27
     /**
30 28
      * @covers Detain\Cpanel\Cpanel::setopt
31 29
      * @todo   Implement testSetopt().
32 30
      */
33
-    public function testSetopt()
34
-    {
31
+    public function testSetopt() {
35 32
         // Remove the following lines when you implement this test.
36 33
         $this->markTestIncomplete(
37 34
             'This test has not been implemented yet.'
@@ -42,8 +39,7 @@  discard block
 block discarded – undo
42 39
      * @covers Detain\Cpanel\Cpanel::setCredentials
43 40
      * @todo   Implement testSetCredentials().
44 41
      */
45
-    public function testSetCredentials()
46
-    {
42
+    public function testSetCredentials() {
47 43
         // Remove the following lines when you implement this test.
48 44
         $this->markTestIncomplete(
49 45
             'This test has not been implemented yet.'
@@ -54,8 +50,7 @@  discard block
 block discarded – undo
54 50
      * @covers Detain\Cpanel\Cpanel::set_format
55 51
      * @todo   Implement testSet_format().
56 52
      */
57
-    public function testSet_format()
58
-    {
53
+    public function testSet_format() {
59 54
         // Remove the following lines when you implement this test.
60 55
         $this->markTestIncomplete(
61 56
             'This test has not been implemented yet.'
@@ -66,8 +61,7 @@  discard block
 block discarded – undo
66 61
      * @covers Detain\Cpanel\Cpanel::reactivateLicense
67 62
      * @todo   Implement testReactivateLicense().
68 63
      */
69
-    public function testReactivateLicense()
70
-    {
64
+    public function testReactivateLicense() {
71 65
         // Remove the following lines when you implement this test.
72 66
         $this->markTestIncomplete(
73 67
             'This test has not been implemented yet.'
@@ -78,8 +72,7 @@  discard block
 block discarded – undo
78 72
      * @covers Detain\Cpanel\Cpanel::expireLicense
79 73
      * @todo   Implement testExpireLicense().
80 74
      */
81
-    public function testExpireLicense()
82
-    {
75
+    public function testExpireLicense() {
83 76
         // Remove the following lines when you implement this test.
84 77
         $this->markTestIncomplete(
85 78
             'This test has not been implemented yet.'
@@ -90,8 +83,7 @@  discard block
 block discarded – undo
90 83
      * @covers Detain\Cpanel\Cpanel::extendOnetimeUpdates
91 84
      * @todo   Implement testExtendOnetimeUpdates().
92 85
      */
93
-    public function testExtendOnetimeUpdates()
94
-    {
86
+    public function testExtendOnetimeUpdates() {
95 87
         // Remove the following lines when you implement this test.
96 88
         $this->markTestIncomplete(
97 89
             'This test has not been implemented yet.'
@@ -102,8 +94,7 @@  discard block
 block discarded – undo
102 94
      * @covers Detain\Cpanel\Cpanel::changeip
103 95
      * @todo   Implement testChangeip().
104 96
      */
105
-    public function testChangeip()
106
-    {
97
+    public function testChangeip() {
107 98
         // Remove the following lines when you implement this test.
108 99
         $this->markTestIncomplete(
109 100
             'This test has not been implemented yet.'
@@ -114,8 +105,7 @@  discard block
 block discarded – undo
114 105
      * @covers Detain\Cpanel\Cpanel::requestTransfer
115 106
      * @todo   Implement testRequestTransfer().
116 107
      */
117
-    public function testRequestTransfer()
118
-    {
108
+    public function testRequestTransfer() {
119 109
         // Remove the following lines when you implement this test.
120 110
         $this->markTestIncomplete(
121 111
             'This test has not been implemented yet.'
@@ -126,8 +116,7 @@  discard block
 block discarded – undo
126 116
      * @covers Detain\Cpanel\Cpanel::activateLicense
127 117
      * @todo   Implement testActivateLicense().
128 118
      */
129
-    public function testActivateLicense()
130
-    {
119
+    public function testActivateLicense() {
131 120
         // Remove the following lines when you implement this test.
132 121
         $this->markTestIncomplete(
133 122
             'This test has not been implemented yet.'
@@ -138,8 +127,7 @@  discard block
 block discarded – undo
138 127
      * @covers Detain\Cpanel\Cpanel::addPickupPass
139 128
      * @todo   Implement testAddPickupPass().
140 129
      */
141
-    public function testAddPickupPass()
142
-    {
130
+    public function testAddPickupPass() {
143 131
         // Remove the following lines when you implement this test.
144 132
         $this->markTestIncomplete(
145 133
             'This test has not been implemented yet.'
@@ -150,8 +138,7 @@  discard block
 block discarded – undo
150 138
      * @covers Detain\Cpanel\Cpanel::registerAuth
151 139
      * @todo   Implement testRegisterAuth().
152 140
      */
153
-    public function testRegisterAuth()
154
-    {
141
+    public function testRegisterAuth() {
155 142
         // Remove the following lines when you implement this test.
156 143
         $this->markTestIncomplete(
157 144
             'This test has not been implemented yet.'
@@ -162,8 +149,7 @@  discard block
 block discarded – undo
162 149
      * @covers Detain\Cpanel\Cpanel::fetchGroups
163 150
      * @todo   Implement testFetchGroups().
164 151
      */
165
-    public function testFetchGroups()
166
-    {
152
+    public function testFetchGroups() {
167 153
         // Remove the following lines when you implement this test.
168 154
         $this->markTestIncomplete(
169 155
             'This test has not been implemented yet.'
@@ -174,8 +160,7 @@  discard block
 block discarded – undo
174 160
      * @covers Detain\Cpanel\Cpanel::fetchLicenseRiskData
175 161
      * @todo   Implement testFetchLicenseRiskData().
176 162
      */
177
-    public function testFetchLicenseRiskData()
178
-    {
163
+    public function testFetchLicenseRiskData() {
179 164
         // Remove the following lines when you implement this test.
180 165
         $this->markTestIncomplete(
181 166
             'This test has not been implemented yet.'
@@ -186,8 +171,7 @@  discard block
 block discarded – undo
186 171
      * @covers Detain\Cpanel\Cpanel::fetchLicenseRaw
187 172
      * @todo   Implement testFetchLicenseRaw().
188 173
      */
189
-    public function testFetchLicenseRaw()
190
-    {
174
+    public function testFetchLicenseRaw() {
191 175
         // Remove the following lines when you implement this test.
192 176
         $this->markTestIncomplete(
193 177
             'This test has not been implemented yet.'
@@ -198,8 +182,7 @@  discard block
 block discarded – undo
198 182
      * @covers Detain\Cpanel\Cpanel::fetchLicenseId
199 183
      * @todo   Implement testFetchLicenseId().
200 184
      */
201
-    public function testFetchLicenseId()
202
-    {
185
+    public function testFetchLicenseId() {
203 186
         // Remove the following lines when you implement this test.
204 187
         $this->markTestIncomplete(
205 188
             'This test has not been implemented yet.'
@@ -210,8 +193,7 @@  discard block
 block discarded – undo
210 193
      * @covers Detain\Cpanel\Cpanel::fetchPackages
211 194
      * @todo   Implement testFetchPackages().
212 195
      */
213
-    public function testFetchPackages()
214
-    {
196
+    public function testFetchPackages() {
215 197
         // Remove the following lines when you implement this test.
216 198
         $this->markTestIncomplete(
217 199
             'This test has not been implemented yet.'
@@ -222,8 +204,7 @@  discard block
 block discarded – undo
222 204
      * @covers Detain\Cpanel\Cpanel::fetchLicenses
223 205
      * @todo   Implement testFetchLicenses().
224 206
      */
225
-    public function testFetchLicenses()
226
-    {
207
+    public function testFetchLicenses() {
227 208
         // Remove the following lines when you implement this test.
228 209
         $this->markTestIncomplete(
229 210
             'This test has not been implemented yet.'
@@ -234,8 +215,7 @@  discard block
 block discarded – undo
234 215
      * @covers Detain\Cpanel\Cpanel::fetchExpiredLicenses
235 216
      * @todo   Implement testFetchExpiredLicenses().
236 217
      */
237
-    public function testFetchExpiredLicenses()
238
-    {
218
+    public function testFetchExpiredLicenses() {
239 219
         // Remove the following lines when you implement this test.
240 220
         $this->markTestIncomplete(
241 221
             'This test has not been implemented yet.'
@@ -246,8 +226,7 @@  discard block
 block discarded – undo
246 226
      * @covers Detain\Cpanel\Cpanel::findKey
247 227
      * @todo   Implement testFindKey().
248 228
      */
249
-    public function testFindKey()
250
-    {
229
+    public function testFindKey() {
251 230
         // Remove the following lines when you implement this test.
252 231
         $this->markTestIncomplete(
253 232
             'This test has not been implemented yet.'
Please login to merge, or discard this patch.