Passed
Push — master ( 111bd7...9273d1 )
by Stefan
06:58
created
web/diag/radius_tests.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 $validator = new \web\lib\common\InputValidation();
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     // contains port number; needs to be redacted for filter_var to work
72 72
     // in any case, it's a printable string, so filter it initially
73 73
     
74
-    $filteredHost = filter_input(INPUT_GET,'src', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST,'src', FILTER_SANITIZE_STRING);
74
+    $filteredHost = filter_input(INPUT_GET, 'src', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'src', FILTER_SANITIZE_STRING);
75 75
     $hostonly1 = preg_replace('/:[0-9]*$/', "", $filteredHost);
76 76
     $hostonly2 = preg_replace('/^\[/', "", $hostonly1);
77 77
     $hostonly3 = preg_replace('/\]$/', "", $hostonly2);
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
                             break;
148 148
                         case \core\common\Entity::L_REMARK:
149 149
                         case \core\common\Entity::L_WARN:
150
-                            $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level];
150
+                            $message = _("<strong>Test partially successful</strong>: authentication succeded.").' '.$additional_message[$level];
151 151
                             break;
152 152
                         case \core\common\Entity::L_ERROR:
153
-                            $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level];
153
+                            $message = _("<strong>Test FAILED</strong>: authentication succeded.").' '.$additional_message[$level];
154 154
                             break;
155 155
                     }
156 156
                     break;
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             case \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT:
202 202
                 $level = $returnarray['result'][$i]['level'];
203 203
                 if ($level > \core\common\Entity::L_OK) {
204
-                    $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.") . ' ' . $additional_message[$level];
204
+                    $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.").' '.$additional_message[$level];
205 205
                 } else {
206 206
                     $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.");
207 207
                 }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                 $level = \core\common\Entity::L_ERROR;
225 225
                 break;
226 226
         }
227
-        $loggerInstance->debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n");
227
+        $loggerInstance->debug(4, "SERVER=".$returnarray['result'][$i]['server']."\n");
228 228
         $returnarray['result'][$i]['level'] = $level;
229 229
         $returnarray['result'][$i]['message'] = $message;
230 230
         break;
@@ -238,13 +238,13 @@  discard block
 block discarded – undo
238 238
         if (isset($rfc6614suite->TLS_CA_checks_result[$host])) {
239 239
             $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']);
240 240
             if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) {
241
-                $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
241
+                $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!").' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
242 242
                 $returnarray['level'] = \core\common\Entity::L_ERROR;
243 243
             } else {
244 244
                 $returnarray['message'] = $rfc6614suite->returnCodes[$rfc6614suite->TLS_CA_checks_result[$host]['status']]["message"];
245 245
                 $returnarray['level'] = \core\common\Entity::L_OK;
246 246
                 if ($rfc6614suite->TLS_CA_checks_result[$host]['status'] != \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) {
247
-                    $returnarray['message'] .= ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
247
+                    $returnarray['message'] .= ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
248 248
                 } else {
249 249
                     $returnarray['level'] = \core\common\Entity::L_ERROR;
250 250
                 }
Please login to merge, or discard this patch.