Passed
Push — release_2_0 ( 1665ce...e7c2fb )
by Stefan
08:09
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;
@@ -252,9 +252,9 @@  discard block
 block discarded – undo
252 252
         }
253 253
         // we tried to contact someone, and know how long that took
254 254
         $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']);
255
-        $timeDisplay = ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
255
+        $timeDisplay = ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
256 256
         if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) {
257
-            $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . $timeDisplay;
257
+            $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!").$timeDisplay;
258 258
             $returnarray['level'] = \core\common\Entity::L_ERROR;
259 259
             $returnarray['result'] = $testresult;
260 260
             break;
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         $returnarray['level'] = \core\common\Entity::L_OK;
265 265
         // override if the connection was with a mismatching server name
266 266
         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)) {
267
-            $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!") . $timeDisplay;
267
+            $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!").$timeDisplay;
268 268
             $returnarray['level'] = \core\common\Entity::L_WARN;
269 269
         }
270 270
         switch ($rfc6614suite->TLS_CA_checks_result[$host]['status']) {
Please login to merge, or discard this patch.