Passed
Push — release_2_0 ( 4a3de7...1665ce )
by Stefan
08:21
created
web/diag/radius_tests.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22 22
 
23
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
24 24
 
25 25
 $loggerInstance = new \core\common\Logging();
26 26
 $validator = new \web\lib\common\InputValidation();
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 function disp_name($eap)
46 46
 {
47 47
     $displayName = \core\common\EAP::eapDisplayName($eap);
48
-    return $displayName['OUTER'] . ( $displayName['INNER'] != '' ? '-' . $displayName['INNER'] : '');
48
+    return $displayName['OUTER'].($displayName['INNER'] != '' ? '-'.$displayName['INNER'] : '');
49 49
 }
50 50
 
51 51
 if (!isset($_REQUEST['test_type']) || !$_REQUEST['test_type']) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     $testsuite = new \core\diag\RADIUSTests($check_realm, $my_profile->getRealmCheckOuterUsername(), $my_profile->getEapMethodsinOrderOfPreference(1), $my_profile->getCollapsedAttributes()['eap:server_name'], $my_profile->getCollapsedAttributes()['eap:ca_file']);
69 69
 } else {
70 70
     $my_profile = NULL;
71
-    $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
71
+    $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
72 72
 }
73 73
 
74 74
 
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
                             break;
159 159
                         case \core\common\Entity::L_REMARK:
160 160
                         case \core\common\Entity::L_WARN:
161
-                            $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level];
161
+                            $message = _("<strong>Test partially successful</strong>: authentication succeded.").' '.$additional_message[$level];
162 162
                             break;
163 163
                         case \core\common\Entity::L_ERROR:
164
-                            $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level];
164
+                            $message = _("<strong>Test FAILED</strong>: authentication succeded.").' '.$additional_message[$level];
165 165
                             break;
166 166
                     }
167 167
                     break;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             case \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT:
213 213
                 $level = $returnarray['result'][$i]['level'];
214 214
                 if ($level > \core\common\Entity::L_OK) {
215
-                    $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];
215
+                    $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];
216 216
                 } else {
217 217
                     $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.");
218 218
                 }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
                 $level = \core\common\Entity::L_ERROR;
236 236
                 break;
237 237
         }
238
-        $loggerInstance->debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n");
238
+        $loggerInstance->debug(4, "SERVER=".$returnarray['result'][$i]['server']."\n");
239 239
         $returnarray['result'][$i]['level'] = $level;
240 240
         $returnarray['result'][$i]['message'] = $message;
241 241
         break;
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         if (isset($rfc6614suite->TLS_CA_checks_result[$host])) {
250 250
             $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']);
251 251
             if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) {
252
-                $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)';
252
+                $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)';
253 253
                 $returnarray['level'] = \core\common\Entity::L_ERROR;
254 254
             } else {
255 255
                 // probably all is well, but we override this default later if need be
@@ -257,11 +257,11 @@  discard block
 block discarded – undo
257 257
                 $returnarray['level'] = \core\common\Entity::L_OK;
258 258
                 // override if the connection was with a mismatching server name
259 259
                 if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH)) {
260
-                    $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!") . ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
260
+                    $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!").' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
261 261
                     $returnarray['level'] = \core\common\Entity::L_WARN;
262 262
                 }
263 263
                 if ($rfc6614suite->TLS_CA_checks_result[$host]['status'] != \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) {
264
-                    $returnarray['message'] .= ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
264
+                    $returnarray['message'] .= ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
265 265
                 } else {
266 266
                     $returnarray['level'] = \core\common\Entity::L_ERROR;
267 267
                 }
Please login to merge, or discard this patch.