| Total Complexity | 107 |
| Total Lines | 537 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like RADIUSTestsUI often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use RADIUSTestsUI, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 36 | class RADIUSTestsUI extends AbstractTest |
||
| 37 | { |
||
| 38 | |||
| 39 | /** |
||
| 40 | * This private variable contains the realm to be checked. Is filled in the |
||
| 41 | * class constructor. |
||
| 42 | * |
||
| 43 | * @var string |
||
| 44 | */ |
||
| 45 | public $realm = NULL; |
||
| 46 | public $outerUser = NULL; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * result of the reachability tests |
||
| 50 | * |
||
| 51 | * @var array |
||
| 52 | */ |
||
| 53 | public $allReachabilityResults = []; |
||
| 54 | |||
| 55 | private $hostMap = []; |
||
| 56 | private $protocolsMap = []; |
||
| 57 | private $globalLevelStatic = \core\common\Entity::L_OK; |
||
| 58 | private $globalLevelDynamic = \core\common\Entity::L_OK; |
||
| 59 | private $rfc7585suite = NULL; |
||
| 60 | private $srv; |
||
| 61 | private $naptr; |
||
| 62 | private $naptrValid; |
||
| 63 | private $hosts; |
||
| 64 | private $testSuite; |
||
| 65 | private $areFailed = FALSE; |
||
| 66 | private $globalInfo = []; |
||
| 67 | private $stateIcons = []; |
||
| 68 | private $states; |
||
| 69 | private $certFields; |
||
| 70 | private $timestamp; |
||
| 71 | const RADIUS_TEST_OPERATION_MODE_SHALLOW = 1; |
||
| 72 | const RADIUS_TEST_OPERATION_MODE_THOROUGH = 2; |
||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | /** |
||
| 77 | * Constructor for the RADIUSTestsUI class. The single mandatory parameter is the |
||
| 78 | * token indicating tests that were carried out and saved as JSON files. |
||
| 79 | * |
||
| 80 | * @param string $token the token which points to a directory |
||
| 81 | * @throws Exception |
||
| 82 | */ |
||
| 83 | public function __construct($token) |
||
| 143 | } |
||
| 144 | } |
||
| 145 | |||
| 146 | public function getTimeStamp() |
||
| 147 | { |
||
| 148 | return $this->timestamp; |
||
| 149 | } |
||
| 150 | /** |
||
| 151 | * sets the global status for static tests |
||
| 152 | */ |
||
| 153 | public function setGlobalStaticResult() |
||
| 157 | } |
||
| 158 | } |
||
| 159 | |||
| 160 | public function setGlobalDynamicResult() |
||
| 161 | { |
||
| 162 | if (isset($this->allReachabilityResults['capath'])) { |
||
| 163 | foreach ($this->allReachabilityResults['capath'] as $capath) { |
||
| 164 | $this->globalLevelDynamic = max($this->globalLevelDynamic, $capath->level); |
||
| 165 | } |
||
| 166 | } |
||
| 167 | if (isset($this->allReachabilityResults['clients'])) { |
||
| 168 | foreach ($this->allReachabilityResults['clients'] as $clients) { |
||
| 169 | $srefused = FALSE; |
||
| 170 | $level = \core\common\Entity::L_OK; |
||
| 171 | foreach ($clients->ca as $ca) { |
||
| 172 | foreach ($ca->certificate as $certificate) { |
||
| 173 | if ($certificate->returncode == \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) { |
||
| 174 | $srefused = $this->areFailed = TRUE; |
||
| 175 | } |
||
| 176 | } |
||
| 177 | if (!$srefused) { |
||
| 178 | foreach ($clients->ca as $cca) { |
||
| 179 | foreach ($cca->certificate as $certificate) { |
||
| 180 | $level = $certificate->returncode; |
||
| 181 | if ($level < 0) { |
||
| 182 | $level = \core\common\Entity::L_ERROR; |
||
| 183 | $this->areFailed = TRUE; |
||
| 184 | } |
||
| 185 | if ($certificate->expected != 'PASS') { |
||
| 186 | if ($certificate->connected == 1) { |
||
| 187 | $level = \core\common\Entity::L_WARN; |
||
| 188 | } else { |
||
| 189 | $level = \core\common\Entity::L_OK; |
||
| 190 | } |
||
| 191 | } |
||
| 192 | } |
||
| 193 | } |
||
| 194 | } |
||
| 195 | } |
||
| 196 | $this->globalLevelDynamic = max($this->globalLevelDynamic, $level); |
||
| 197 | } |
||
| 198 | } |
||
| 199 | } |
||
| 200 | |||
| 201 | public function isDynamic() |
||
| 202 | { |
||
| 203 | if ($this->naptr > 0) { |
||
| 204 | return TRUE; |
||
| 205 | } |
||
| 206 | return FALSE; |
||
| 207 | } |
||
| 208 | /** |
||
| 209 | * prints tabs-1 |
||
| 210 | * |
||
| 211 | * |
||
| 212 | */ |
||
| 213 | public function printOverview() |
||
| 214 | { |
||
| 215 | $out = []; |
||
| 216 | $out[] = "<fieldset class='option_container'> |
||
| 217 | <legend> |
||
| 218 | <strong>"._("Overview").'</strong> |
||
| 219 | </legend>'; |
||
| 220 | $out[] = "<strong>"._("DNS checks")."</strong><div>"; |
||
| 221 | if ($this->naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
||
| 222 | $out[] = "<table>"; |
||
| 223 | $out[] = "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
||
| 224 | switch ($this->naptr) { |
||
| 225 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
||
| 226 | $out[] = _("This realm has no NAPTR records."); |
||
| 227 | break; |
||
| 228 | case \core\diag\RFC7585Tests::RETVAL_ONLYUNRELATEDNAPTR: |
||
| 229 | $out[] = _("This realm has NAPTR records, but none are related to this roaming consortium."); |
||
| 230 | break; |
||
| 231 | default: // if none of the possible negative retvals, then we have matching NAPTRs |
||
| 232 | $out[] = sprintf(_("This realm has %d NAPTR records relating to this roaming consortium."), $this->naptr); |
||
| 233 | } |
||
| 234 | $out[] = "</td></tr>"; |
||
| 235 | |||
| 236 | if ($this->naptr > 0) { |
||
| 237 | $out[] = "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
||
| 238 | switch ($this->naptrValid) { |
||
| 239 | case \core\diag\RADIUSTests::RETVAL_OK: |
||
| 240 | $out[] = "No issues found."; |
||
| 241 | break; |
||
| 242 | case \core\diag\RADIUSTests::RETVAL_INVALID: |
||
| 243 | $out[] = _("At least one NAPTR with invalid content found!"); |
||
| 244 | break; |
||
| 245 | } |
||
| 246 | $out[] = "</td></tr>"; |
||
| 247 | } |
||
| 248 | // SRV resolution |
||
| 249 | if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK) { |
||
| 250 | $out[] = "<tr><td>"._("Checking SRVs:")."</td><td>"; |
||
| 251 | switch ($this->srv) { |
||
| 252 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
||
| 253 | $out[] = _("This check was skipped."); |
||
| 254 | break; |
||
| 255 | case \core\diag\RADIUSTests::RETVAL_INVALID: |
||
| 256 | $out[] = _("At least one NAPTR with invalid content found!"); |
||
| 257 | break; |
||
| 258 | default: // print number of successfully retrieved SRV targets |
||
| 259 | $out[] = sprintf(_("%d host names discovered."), $this->srv); |
||
| 260 | } |
||
| 261 | $out[] = "</td></tr>"; |
||
| 262 | } |
||
| 263 | // IP addresses for the hosts |
||
| 264 | if ($this->naptr > 0 && $this->naptrValid == \core\diag\RADIUSTests::RETVAL_OK && $this->srv > 0) { |
||
| 265 | $out[] = "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
||
| 266 | switch ($this->srv) { |
||
| 267 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
||
| 268 | $out[] = _("This check was skipped."); |
||
| 269 | break; |
||
| 270 | case \core\diag\RADIUSTests::RETVAL_INVALID: |
||
| 271 | $out[] = _("At least one hostname could not be resolved!"); |
||
| 272 | break; |
||
| 273 | default: // print number of successfully retrieved SRV targets |
||
| 274 | $out[] = sprintf(_("%d IP addresses resolved."), $this->hosts); |
||
| 275 | } |
||
| 276 | $out[] = "</td></tr>"; |
||
| 277 | } |
||
| 278 | |||
| 279 | $out[] = "</table><br/>"; |
||
| 280 | $out[] = sprintf(_("Realm is <strong>%s</strong> "), _(($this->naptr > 0 ? "DYNAMIC" : "STATIC"))); |
||
| 281 | if (count($this->testSuite->listerrors()) == 0) { |
||
| 282 | $out[] = _("with no DNS errors encountered. Congratulations!"); |
||
| 283 | } else { |
||
| 284 | $out[] = _("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below."); |
||
| 285 | $out[] = "<div class='notacceptable'><table>"; |
||
| 286 | foreach ($this->testSuite->listerrors() as $details) { |
||
| 287 | $out[] = "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
||
| 288 | } |
||
| 289 | $out[] = "</table></div>"; |
||
| 290 | } |
||
| 291 | $out[] = '</div>'; |
||
| 292 | } else { |
||
| 293 | $out[] = "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
||
| 294 | } |
||
| 295 | $out[] = "<hr><strong>"._("Static connectivity tests")."</strong> |
||
| 296 | <table><tr> |
||
| 297 | <td class='icon_td'>"; |
||
| 298 | $out[] = "<img src='".$this->stateIcons[$this->globalLevelStatic]."' id='main_static_ico' class='icon'></td><td id='main_static_result'>". |
||
| 299 | $this->globalInfo[$this->globalLevelStatic].' '. _("See the appropriate tab for details.").'</td> |
||
| 300 | </tr></table>'; |
||
| 301 | if ($this->naptr > 0) { |
||
| 302 | $out[] = "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
||
| 303 | <table><tr> |
||
| 304 | <td class='icon_td'><img src='".$this->stateIcons[$this->globalLevelDynamic]."' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result'>". |
||
| 305 | $this->globalInfo[$this->globalLevelDynamic].' '._("See the appropriate tab for details.").'</td></tr></table>'; |
||
| 306 | } |
||
| 307 | $out[] = '</fieldset>'; |
||
| 308 | return join('', $out); |
||
| 309 | } |
||
| 310 | |||
| 311 | public function printStatic() |
||
| 312 | { |
||
| 313 | $out = []; |
||
| 314 | $out[] = '<fieldset class="option_container" id="static_tests"> |
||
| 315 | <legend><strong>'; |
||
| 316 | $out[] = _("STATIC connectivity tests"); |
||
| 317 | $out[] = '</strong> </legend>'; |
||
| 318 | $out[] = _("This check sends a request for the realm through various entry points of the roaming consortium infrastructure. The request will contain the 'Operator-Name' attribute, and will be larger than 1500 Bytes to catch two common configuration problems.<br/>Since we don't have actual credentials for the realm, we can't authenticate successfully - so the expected outcome is to get an Access-Reject after having gone through an EAP conversation."); |
||
| 319 | $out[] = '<p>'; |
||
| 320 | foreach ($this->allReachabilityResults['udp'] as $udp) { |
||
| 321 | $hostindex = $udp->hostindex; |
||
| 322 | $result = $udp->result[0]; |
||
| 323 | $out[] = '<hr>'; |
||
| 324 | $out[] = sprintf(_("Testing from: <strong>%s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']).'</strong>'; |
||
| 325 | $out[] = '<ul style="list-style-type: none;"><li>'; |
||
| 326 | $out[] = "<table id='results$hostindex' style='width:100%' class='udp_results'> |
||
| 327 | <tr> |
||
| 328 | <td class='icon_td'><img src='".$this->stateIcons[$result->level]."' id='src".$hostindex."_img'></td> |
||
| 329 | <td id='src$hostindex' colspan=2> |
||
| 330 | "; |
||
| 331 | $out[] = '<strong>'.($result->server ? $result->server : _("Connected to undetermined server")).'</strong><br/>'.sprintf (_("elapsed time: %sms."), $result->time_millisec).'<div>'.$result->message.'</div>'; |
||
| 332 | |||
| 333 | if ($result->level > \core\common\Entity::L_OK && property_exists($result, 'cert_oddities')) { |
||
| 334 | foreach ($result->cert_oddities as $oddities) { |
||
| 335 | $out[] = '<tr class="results_tr"><td> </td><td class="icon_td"><img src="'.$this->stateIcons[$oddities->level].'"></td><td>'.$oddities->message.'</td></tr>'; |
||
| 336 | } |
||
| 337 | } |
||
| 338 | $more = ''; |
||
| 339 | if ($result->server_cert) { |
||
| 340 | $more .= '<div class="more">'; |
||
| 341 | $certdesc = '<br>'.$this->certFields['title'].'<ul>'; |
||
| 342 | foreach ($result->server_cert as $sckey => $sc) { |
||
| 343 | if (array_key_exists($sckey, $this->certFields)) { |
||
| 344 | $certdesc .= '<li>'.$this->certFields[$sckey].' '.$sc; |
||
| 345 | } |
||
| 346 | } |
||
| 347 | if ($result->server_cert->extensions) { |
||
| 348 | $certdesc .= '<li>' . _('Extensions') . '<ul>'; |
||
| 349 | foreach ($result->server_cert->extensions as $ekey => $eval) { |
||
| 350 | $certdesc .= '<li>' . $ekey . ': ' . $eval; |
||
| 351 | } |
||
| 352 | $certdesc .= '</ul>'; |
||
| 353 | } |
||
| 354 | $certdesc .= '</ul>'; |
||
| 355 | $more .= '<span class="morecontent"><span>'.$certdesc. |
||
| 356 | '</span><a href="" class="morelink">'._("show server certificate details").'»</a></span></div>'; |
||
| 357 | } |
||
| 358 | if ($more != '' ) { |
||
| 359 | $out[] = '<tr><td> </td><td colspan="2">'.$more.'</td></tr>'; |
||
| 360 | } |
||
| 361 | $out[] = "</table></ul>"; |
||
| 362 | } |
||
| 363 | $out[] = '</fieldset>'; |
||
| 364 | return join('', $out); |
||
| 365 | } |
||
| 366 | |||
| 367 | private function collectCAPath() |
||
| 368 | { |
||
| 369 | $capathtest = []; |
||
| 370 | $capathtest[] = '<p><strong>'._("Checking server handshake...")."</strong><p>"; |
||
| 371 | foreach ($this->allReachabilityResults['capath'] as $capath) { |
||
| 372 | $hostindex = $capath->hostindex; |
||
| 373 | $level = $capath->level; |
||
| 374 | if ($capath->level == \core\common\Entity::L_OK && $capath->result == \core\diag\RADIUSTests::RETVAL_INVALID) { |
||
| 375 | $level = \core\common\Entity::L_WARN; |
||
| 376 | } |
||
| 377 | $capathtest[] = '<p><strong>'.$this->hostMap[$capath->IP].'</strong> ('.$capath->name.') '; |
||
| 378 | $prots = []; |
||
| 379 | if (isset($this->protocolsMap[$capath->IP]) && $this->protocolsMap[$capath->IP] != '') { |
||
| 380 | $prots = explode(';', $this->protocolsMap[$capath->IP]); |
||
| 381 | if (!empty($prots)) { |
||
| 382 | $capathtest[] = ' ' . _("supported TLS protocols: "); |
||
| 383 | $capathtest[] = implode(', ', $prots); |
||
| 384 | if (!in_array("TLS1.3", $prots)) { |
||
| 385 | $capathtest[] = ' ' . '<font color="red">' . _("not supported: ") . 'TLS1.3</font>'; |
||
| 386 | } |
||
| 387 | } |
||
| 388 | } |
||
| 389 | $capathtest[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
||
| 390 | $capathtest[] = "<table id='caresults$hostindex' style='width:100%'> |
||
| 391 | <tr> |
||
| 392 | <td class='icon_td'><img src='"; |
||
| 393 | $capathtest[] = $this->stateIcons[$level]."' id='srcca".$hostindex."_img'></td> |
||
| 394 | <td id='srcca$hostindex'>"; |
||
| 395 | $more = ''; |
||
| 396 | if ($capath->certdata && $capath->certdata->subject != '') { |
||
| 397 | $more .= '<div class="more">'; |
||
| 398 | $certdesc = '<br>'.$this->certFields['title'].'<ul>'; |
||
| 399 | if ($capath->certdata->subject) { |
||
| 400 | $certdesc .= '<li>'.$this->certFields['subject'].' '.$capath->certdata->subject; |
||
| 401 | } |
||
| 402 | if ($capath->certdata->issuer) { |
||
| 403 | $certdesc .= '<li>'.$this->certFields['issuer'].' '.$capath->certdata->issuer; |
||
| 404 | } |
||
| 405 | if ($capath->certdata->validTo) { |
||
| 406 | $certdesc .= '<li>'.$this->certFields['validTo'].' '. |
||
| 407 | date_create_from_format('ymdGis', |
||
| 408 | substr($capath->certdata->validTo, 0, -1))->format('Y-m-d H:i:s'). ' UTC'; |
||
| 409 | } |
||
| 410 | if ($capath->certdata->extensions) { |
||
| 411 | if ($capath->certdata->extensions->subjectaltname) { |
||
| 412 | $certdesc .= '<li>'.$this->certFields['subjectaltname'].' '.$capath->certdata->extensions->subjectaltname; |
||
| 413 | } |
||
| 414 | } |
||
| 415 | if ($capath->certdata->extensions->policies) { |
||
| 416 | $certdesc .= '<li>'.$this->certFields['policies'].' '.$capath->certdata->extensions->policies; |
||
| 417 | } |
||
| 418 | if ($capath->certdata->extensions->crldistributionpoints) { |
||
| 419 | $certdesc .= '<li>'.$this->certFields['crldistributionpoints'].' '.$capath->certdata->extensions->crldistributionpoints; |
||
| 420 | } |
||
| 421 | if ($capath->certdata->extensions->authorityinfoaccess) { |
||
| 422 | $certdesc .= '<li>'.$this->certFields['authorityinfoaccess'].' '.$capath->certdata->extensions->authorityinfoaccess; |
||
| 423 | } |
||
| 424 | |||
| 425 | $certdesc .= '</ul>'; |
||
| 426 | $more .= '<span class="morecontent"><span>'.$certdesc.$protocoldesc. |
||
| 427 | '</span> <a href="" class="morelink">'._("more").'»</a></span></td></tr>'; |
||
| 428 | } else { |
||
| 429 | $certdesc = '<br>'; |
||
| 430 | } |
||
| 431 | $capathtest[] = '<div>'.($capath->message!='' ? $capath->message : _('Test failed')).'</div>'.$more; |
||
| 432 | $capathtest[] = '</td> |
||
| 433 | </tr> |
||
| 434 | </table>'; |
||
| 435 | $capathtest[] = '</li></ul>'; |
||
| 436 | } |
||
| 437 | return $capathtest; |
||
| 438 | } |
||
| 439 | |||
| 440 | private function collectClients() |
||
| 441 | { |
||
| 442 | $clientstest = []; |
||
| 443 | foreach ($this->allReachabilityResults['clients'] as $clients) { |
||
| 444 | if ($clients->result == RADIUSTests::RETVAL_SKIPPED) { |
||
| 445 | continue; |
||
| 446 | } |
||
| 447 | $hostindex = $clients->hostindex; |
||
| 448 | $clientstest[] = '<p><strong>'.$this->hostMap[$clients->IP].'</strong></p>'; |
||
| 449 | $clientstest[] = "<span id='clientresults$hostindex'>"; |
||
| 450 | $clientstest[] = '<p></p>'; |
||
| 451 | if ($this->globalLevelDynamic != \core\common\Entity::L_ERROR) { |
||
| 452 | if (property_exists($clients, 'ca')) { |
||
| 453 | $clientstest[] = '<ol>'; |
||
| 454 | foreach ($clients->ca as $ca) { |
||
| 455 | $srefused = 0; |
||
| 456 | $cliinfo = ''; |
||
| 457 | $cliinfo .= '<li>'._('Client certificate').' <b>'.$ca->clientcertinfo->from. |
||
| 458 | '</b>'.', '.$ca->clientcertinfo->message . |
||
| 459 | '<br> (CA: '.$ca->clientcertinfo->issuer.')<ul>'; |
||
| 460 | foreach ($ca->certificate as $certificate) { |
||
| 461 | if ($certificate->returncode == \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) { |
||
| 462 | $srefused = 1; |
||
| 463 | } |
||
| 464 | } |
||
| 465 | if ($srefused == 0) { |
||
| 466 | foreach ($ca->certificate as $certificate) { |
||
| 467 | $cliinfo .= '<li><i>'.$certificate->message. |
||
| 468 | ', '._("expected result: ").$this->states[$certificate->expected].'</i>'; |
||
| 469 | $cliinfo .= '<ul style="list-style-type: none;">'; |
||
| 470 | if (property_exists($certificate, 'finalerror') && $certificate->finalerror == 2) { |
||
| 471 | $cliinfo .= '<li>'._('this test was skipped - no appropriate client certificate').'</li></ul>'; |
||
| 472 | continue; |
||
| 473 | } |
||
| 474 | $level = $certificate->returncode; |
||
| 475 | if ($level < 0) { |
||
| 476 | $level = \core\common\Entity::L_ERROR; |
||
| 477 | } |
||
| 478 | $add = ''; |
||
| 479 | if ($certificate->expected == 'PASS') { |
||
| 480 | if ($certificate->connected == 1) { |
||
| 481 | $state = _("Server accepted this client certificate"); |
||
| 482 | } else { |
||
| 483 | if (property_exists($certificate, 'reason') && $certificate->reason == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA) { |
||
| 484 | $add = '<br>'._('You should update your list of accredited CAs'). |
||
| 485 | ' <a href=\"'.\config\Diagnostics::RADIUSTESTS['accreditedCAsURL'].'\">'. |
||
| 486 | _('Get it from here.').'</a>'; |
||
| 487 | } |
||
| 488 | $state = _('Server did not accept this client certificate - reason').': '. |
||
| 489 | $certificate->resultcomment; |
||
| 490 | } |
||
| 491 | } else { |
||
| 492 | if ($certificate->connected == 1) { |
||
| 493 | $level = \core\common\Entity::L_WARN; |
||
| 494 | $state = _('Server accepted this client certificate, but should not have'); |
||
| 495 | } else { |
||
| 496 | $level = \core\common\Entity::L_OK; |
||
| 497 | $state = _('Server did not accept this client certificate').': '.$certificate->resultcomment; |
||
| 498 | } |
||
| 499 | } |
||
| 500 | $cliinfo .= '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="'.$this->stateIcons[$level].'" style="width: 24px;"></td><td>'.$state; |
||
| 501 | $cliinfo .= ' ('.sprintf(_('elapsed time: %sms.'), $certificate->time_millisec).' ) '.$add.'</td></tr>'; |
||
| 502 | $cliinfo .= '</tbody></table></ul></li>'; |
||
| 503 | if (property_exists($certificate, 'finalerror')) { |
||
| 504 | if ($certificate->finalerror == 1) { |
||
| 505 | $cliinfo .= '<li>'._('Rest of tests for this CA skipped').'</li>'; |
||
| 506 | } |
||
| 507 | } |
||
| 508 | } |
||
| 509 | $cliinfo .= '</ul>'; |
||
| 510 | } |
||
| 511 | |||
| 512 | if ($srefused > 0) { |
||
| 513 | $cliinfo = _('Connection refused'); |
||
| 514 | $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='".$this->stateIcons[\core\common\Entity::L_ERROR]."'></td>". |
||
| 515 | "<td id='srcclient$hostindex'><p>$cliinfo</p></td></tr></table>"; |
||
| 516 | } else { |
||
| 517 | $clientstest[] = "<p>$cliinfo</p>"; |
||
| 518 | } |
||
| 519 | } |
||
| 520 | |||
| 521 | } else { |
||
| 522 | $cliinfo = _('Test failed'); |
||
| 523 | $clientstest[] = "<table><tr><td class='icon_td' id='srcclient".$hostindex."_img'><img src='". |
||
| 524 | $this->stateIcons[\core\common\Entity::L_WARN]."'></td>" . |
||
| 525 | "<td id='srcclient$hostindex'>$cliinfo</td></tr></table>"; |
||
| 526 | } |
||
| 527 | } else { |
||
| 528 | $clientstest[] = '<ul style="list-style-type: none;" class="clientsresult"><li>'; |
||
| 529 | $clientstest[] = "<table id='clientsresults$hostindex' style='width:100%'> |
||
| 530 | <tr> |
||
| 531 | <td class='icon_td'><img src='"; |
||
| 532 | $clientstest[] = $this->stateIcons[\core\common\Entity::L_ERROR]."' id='srcclients".$hostindex."_img'></td> |
||
| 533 | <td id='srcclient$hostindex'>"; |
||
| 534 | $clientstest[] = _("These tests were skipped because of previous errors.").'</td></tr></table></ul>'; |
||
| 535 | } |
||
| 536 | $clientstest[] = '</ol><p></p>'; |
||
| 537 | } |
||
| 538 | return $clientstest; |
||
| 539 | } |
||
| 540 | |||
| 541 | public function printDynamic() |
||
| 573 | } |
||
| 574 | |||
| 575 | } |
||
| 576 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths