Completed
Push — master ( 23b6b6...825bd8 )
by Greg
04:51
created
classes/DomainMOD/Domain.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -94,12 +94,18 @@
 block discarded – undo
94 94
         return $expiry_date;
95 95
     }
96 96
 
97
+    /**
98
+     * @param string $expiry_date
99
+     */
97 100
     public function getNewExpiry($expiry_date, $renewal_years)
98 101
     {
99 102
         $expiry_pieces = explode("-", $expiry_date);
100 103
         return $expiry_pieces[0] + $renewal_years . "-" . $expiry_pieces[1] . "-" . $expiry_pieces[2];
101 104
     }
102 105
 
106
+    /**
107
+     * @param string $new_expiry
108
+     */
103 109
     public function writeNewExpiry($dbcon, $domain, $new_expiry, $notes)
104 110
     {
105 111
         $time = new Time();
Please login to merge, or discard this patch.
classes/DomainMOD/OpenSrs.php 3 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -225,6 +225,9 @@  discard block
 block discarded – undo
225 225
         return $status;
226 226
     }
227 227
 
228
+    /**
229
+     * @param string $expiry_result
230
+     */
228 231
     public function processExpiry($expiry_result)
229 232
     {
230 233
         $unix_expiration_date = strtotime($expiry_result);
@@ -243,6 +246,9 @@  discard block
 block discarded – undo
243 246
         return $dns_servers;
244 247
     }
245 248
 
249
+    /**
250
+     * @param string $privacy_result
251
+     */
246 252
     public function processPrivacy($privacy_result)
247 253
     {
248 254
         if ($privacy_result == 'enabled') {
@@ -253,6 +259,9 @@  discard block
 block discarded – undo
253 259
         return $privacy_status;
254 260
     }
255 261
 
262
+    /**
263
+     * @param string $autorenewal_result
264
+     */
256 265
     public function processAutorenew($autorenewal_result)
257 266
     {
258 267
         if ($autorenewal_result == '1') {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         curl_setopt($handle, CURLOPT_HTTPHEADER, array(
124 124
             'Content-Type:text/xml',
125 125
             'X-Username:' . $account_username,
126
-            'X-Signature:' . md5(md5($xml . $api_key) .  $api_key)));
126
+            'X-Signature:' . md5(md5($xml . $api_key) . $api_key)));
127 127
         curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
128 128
         curl_setopt($handle, CURLOPT_POST, 1);
129 129
         curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         if ($api_call_status == '1') {
144 144
 
145
-            foreach(preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
145
+            foreach (preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
146 146
 
147 147
                 if (preg_match('/<item key="name">(.*)<\/item>/', $xml_line, $match)) {
148 148
                     $domain_list[] = $match[1];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         if ($api_call_status == '1') {
171 171
 
172
-            foreach(preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
172
+            foreach (preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
173 173
 
174 174
                 // get expiration date
175 175
                 if (preg_match('/<item key="expiredate">(.*)<\/item>/', $xml_line, $match)) {
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
         if ($api_call_status == '1') {
202 202
 
203
-            foreach(preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
203
+            foreach (preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
204 204
 
205 205
                 // get privacy status
206 206
                 if (preg_match('/<item key="state">(.*)<\/item>/', $xml_line, $match)) {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public function apiStatus($api_results)
218 218
     {
219 219
         $status = '';
220
-        foreach(preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
220
+        foreach (preg_split("/((\r?\n)|(\r\n?))/", $api_results) as $xml_line) {
221 221
             if (preg_match('/<item key="response_code">200<\/item>/', $xml_line)) {
222 222
                 $status = '1';
223 223
             }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 </data_block>
55 55
                 </body>
56 56
                 </OPS_envelope>
57
-EOD;
57
+eod;
58 58
         return $xml;
59 59
     }
60 60
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 </data_block>
84 84
                 </body>
85 85
                 </OPS_envelope>
86
-EOD;
86
+eod;
87 87
         return $xml;
88 88
     }
89 89
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 </data_block>
113 113
                 </body>
114 114
                 </OPS_envelope>
115
-EOD;
115
+eod;
116 116
         return $xml;
117 117
     }
118 118
 
Please login to merge, or discard this patch.
classes/DomainMOD/Smtp.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -24,6 +24,12 @@
 block discarded – undo
24 24
 class Smtp
25 25
 {
26 26
 
27
+    /**
28
+     * @param string $to_name
29
+     * @param string $subject
30
+     * @param string $message_html
31
+     * @param string $message_text
32
+     */
27 33
     public function send($dbcon, $reply_address, $to_address, $to_name, $subject, $message_html, $message_text)
28 34
     {
29 35
         require_once(DIR_ROOT . '/vendor/autoload.php');
Please login to merge, or discard this patch.
_includes/layout/header.inc.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -244,16 +244,16 @@
 block discarded – undo
244 244
 
245 245
           <span class="visible-sm visible-md visible-lg">
246 246
               <?php
247
-              $breadcrumb_position = 'left';
248
-              require_once(DIR_INC . '/layout/breadcrumbs.inc.php');
249
-              ?>
247
+                $breadcrumb_position = 'left';
248
+                require_once(DIR_INC . '/layout/breadcrumbs.inc.php');
249
+                ?>
250 250
           </span>
251 251
 
252 252
           <span class="visible-xs">
253 253
               <?php
254
-              $breadcrumb_position = 'right';
255
-              require_once(DIR_INC . '/layout/breadcrumbs.inc.php');
256
-              ?>
254
+                $breadcrumb_position = 'right';
255
+                require_once(DIR_INC . '/layout/breadcrumbs.inc.php');
256
+                ?>
257 257
           </span>
258 258
           <BR>
259 259
 
Please login to merge, or discard this patch.
classes/DomainMOD/Freenom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     public function apiCall($full_url)
40 40
     {
41 41
         $handle = curl_init($full_url);
42
-        curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true );
42
+        curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
43 43
         $result = curl_exec($handle);
44 44
         curl_close($handle);
45 45
         return $result;
Please login to merge, or discard this patch.
classes/DomainMOD/Form.php 1 patch
Braces   +41 added lines, -11 removed lines patch added patch discarded remove patch
@@ -48,7 +48,10 @@  discard block
 block discarded – undo
48 48
             echo $before; ?>
49 49
             <div class="form-group">
50 50
                 <label><?php echo $text_to_display; ?><?php if ($required == '1') { ?><?php $layout = new Layout(); echo $layout->highlightText('failure', '*'); ?><?php } ?>
51
-                <?php if ($subtext != '') echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>'; ?></label>
51
+                <?php if ($subtext != '') {
52
+    echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>';
53
+}
54
+?></label>
52 55
                 <input type="<?php if ($is_password == '1') { echo "password"; } else { echo "text"; } ?>" class="form-control" placeholder="<?php echo $text_to_display; ?>" name="<?php echo $name; ?>"
53 56
                     value="<?php echo htmlentities($value, ENT_QUOTES, 'UTF-8'); ?>" maxlength="<?php echo $maxlength; ?>">
54 57
             </div><?php
@@ -62,7 +65,10 @@  discard block
 block discarded – undo
62 65
             echo $before; ?>
63 66
             <div class="form-group">
64 67
                 <label><?php echo $text_to_display; ?><?php if ($required == '1') { ?><?php $layout = new Layout(); echo $layout->highlightText('failure', '*'); ?><?php } ?>
65
-                <?php if ($subtext != '') echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>'; ?></label>
68
+                <?php if ($subtext != '') {
69
+    echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>';
70
+}
71
+?></label>
66 72
                 <textarea class="form-control" placeholder="<?php echo $text_to_display; ?>" name="<?php
67 73
                     echo $name; ?>" style="height: 80px;"><?php echo htmlentities($value, ENT_QUOTES, 'UTF-8'); ?></textarea>
68 74
             </div><?php
@@ -83,7 +89,10 @@  discard block
 block discarded – undo
83 89
             echo $before; ?>
84 90
             <div class="form-group">
85 91
                 <label class="control-label"><?php echo $text_to_display; ?><?php if ($required == '1') { ?><?php $layout = new Layout(); echo $layout->highlightText('failure', '*'); ?><?php } ?>
86
-                <?php if ($subtext != '') echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>'; ?></label>
92
+                <?php if ($subtext != '') {
93
+    echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>';
94
+}
95
+?></label>
87 96
                 <select class="form-control" name="<?php echo $name; ?>"><?php
88 97
         return ob_get_clean();
89 98
     }
@@ -94,7 +103,10 @@  discard block
 block discarded – undo
94 103
             echo $before; ?>
95 104
             <div class="form-group">
96 105
                 <label class="control-label"><?php echo $text_to_display; ?><?php if ($required == '1') { ?><?php $layout = new Layout(); echo $layout->highlightText('failure', '*'); ?><?php } ?>
97
-                <?php if ($subtext != '') echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>'; ?></label>
106
+                <?php if ($subtext != '') {
107
+    echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>';
108
+}
109
+?></label>
98 110
                 <select class="form-control" name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu('parent',this,0)"><?php
99 111
         return ob_get_clean();
100 112
     }
@@ -111,14 +123,20 @@  discard block
 block discarded – undo
111 123
     public function showDropdownOption($value, $text_to_display, $to_compare)
112 124
     {
113 125
         ob_start(); ?>
114
-            <option value="<?php echo $value ?>"<?php if ($value == $to_compare) echo " selected" ?>><?php echo $text_to_display; ?></option><?php
126
+            <option value="<?php echo $value ?>"<?php if ($value == $to_compare) {
127
+    echo " selected" ?>><?php echo $text_to_display;
128
+}
129
+?></option><?php
115 130
         return ob_get_clean();
116 131
     }
117 132
 
118 133
     public function showDropdownOptionJump($url, $value, $text_to_display, $to_compare)
119 134
     {
120 135
         ob_start(); ?>
121
-            <option value="<?php echo htmlentities($url, ENT_QUOTES, 'UTF-8'); ?><?php echo htmlentities($value, ENT_QUOTES, 'UTF-8')?>"<?php if ($value == $to_compare) echo " selected" ?>><?php echo htmlentities($text_to_display, ENT_QUOTES, 'UTF-8'); ?></option><?php
136
+            <option value="<?php echo htmlentities($url, ENT_QUOTES, 'UTF-8'); ?><?php echo htmlentities($value, ENT_QUOTES, 'UTF-8')?>"<?php if ($value == $to_compare) {
137
+    echo " selected" ?>><?php echo htmlentities($text_to_display, ENT_QUOTES, 'UTF-8');
138
+}
139
+?></option><?php
122 140
         return ob_get_clean();
123 141
     }
124 142
 
@@ -159,8 +177,14 @@  discard block
 block discarded – undo
159 177
             echo $before; ?>
160 178
             <div class="form-group">
161 179
                 <label>
162
-                    <input type="checkbox" class="form-control square-red" name="<?php echo $name; ?>" value="<?php echo $value; ?>"<?php if ($value == $to_compare) echo " checked" ?>>
163
-                    <span style="font-weight: normal;"><?php echo "&nbsp;&nbsp;&nbsp;" . $text_to_display; ?><?php if ($subtext != '') echo '<BR><BR><span style="font-weight: normal;">' . $subtext . '</span>'; ?></span>
180
+                    <input type="checkbox" class="form-control square-red" name="<?php echo $name; ?>" value="<?php echo $value; ?>"<?php if ($value == $to_compare) {
181
+    echo " checked" ?>>
182
+                    <span style="font-weight: normal;"><?php echo "&nbsp;&nbsp;&nbsp;" . $text_to_display;
183
+}
184
+?><?php if ($subtext != '') {
185
+    echo '<BR><BR><span style="font-weight: normal;">' . $subtext . '</span>';
186
+}
187
+?></span>
164 188
                 </label>
165 189
             </div><?php
166 190
             echo $after;
@@ -172,7 +196,10 @@  discard block
 block discarded – undo
172 196
         ob_start();
173 197
             echo $before; ?>
174 198
             <div class="form-group">
175
-                <label><?php echo $text_to_display; ?><?php if ($subtext != '') echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>'; ?></label><?php
199
+                <label><?php echo $text_to_display; ?><?php if ($subtext != '') {
200
+    echo '<BR><span style="font-weight: normal;">' . $subtext . '</span><BR>';
201
+}
202
+?></label><?php
176 203
         return ob_get_clean();
177 204
     }
178 205
 
@@ -189,8 +216,11 @@  discard block
 block discarded – undo
189 216
         ob_start();
190 217
             echo $before; ?>
191 218
             <label>
192
-                <input type="radio" class="form-control square-red" name="<?php echo $name; ?>" value="<?php echo $value; ?>"<?php if ($value == $to_compare) echo " checked" ?>>
193
-                &nbsp;<span style="font-weight: normal;"><?php echo $text_to_display; ?></span>
219
+                <input type="radio" class="form-control square-red" name="<?php echo $name; ?>" value="<?php echo $value; ?>"<?php if ($value == $to_compare) {
220
+    echo " checked" ?>>
221
+                &nbsp;<span style="font-weight: normal;"><?php echo $text_to_display;
222
+}
223
+?></span>
194 224
             </label><?php
195 225
             echo $after;
196 226
         return ob_get_clean();
Please login to merge, or discard this patch.
classes/DomainMOD/NameCom.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         curl_setopt($handle, CURLOPT_HTTPHEADER, array(
44 44
             'Api-Username: ' . $account_username,
45 45
             'Api-Token: ' . $api_key));
46
-        curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true );
46
+        curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
47 47
         $result = curl_exec($handle);
48 48
         curl_close($handle);
49 49
         return $result;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $domain_list = array();
62 62
             $domain_count = 0;
63 63
 
64
-            foreach(array_keys($array_results['domains']) as $domain) {
64
+            foreach (array_keys($array_results['domains']) as $domain) {
65 65
 
66 66
                 $domain_list[] = $domain;
67 67
                 $domain_count++;
Please login to merge, or discard this patch.
classes/DomainMOD/System.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,9 @@
 block discarded – undo
199 199
             $qrun->store_result();
200 200
             call_user_func_array(array($qrun, 'bind_result'), $binding);
201 201
 
202
-        } else $error->outputSqlError($dbcon, '1', 'ERROR');
202
+        } else {
203
+            $error->outputSqlError($dbcon, '1', 'ERROR');
204
+        }
203 205
         return $qrun;
204 206
     }
205 207
 
Please login to merge, or discard this patch.
classes/DomainMOD/Format.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $clean_domain_list = $this->stripSpacing($raw_domain_list);
42 42
         $domain_list = explode("\r\n", $clean_domain_list);
43 43
         $new_domain_list = array();
44
-        foreach($domain_list as $value) {
44
+        foreach ($domain_list as $value) {
45 45
             $new_domain_list[] = urlencode($this->stripSpacing($value));
46 46
         }
47 47
         return array_unique($new_domain_list);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function formatForMysql($dbcon, $domain_list)
51 51
     {
52 52
         $new_domain_list = array();
53
-        foreach($domain_list as $value) {
53
+        foreach ($domain_list as $value) {
54 54
             $new_domain_list[] = mysqli_real_escape_string($dbcon, $value);
55 55
         }
56 56
         $list_formatted = implode("\r\n", $new_domain_list);
Please login to merge, or discard this patch.