Fix conformance score calculcation (#313)

This commit is contained in:
Christopher Hertel 2026-05-19 14:40:17 +02:00 • committed by GitHub
commit f12ea0ab58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,17 +68,20 @@ require_once dirname(__DIR__, 2).'/vendor/autoload.php';
continue;
}
++$total;
foreach ($checks as $check) {
if ('FAILURE' === ($check['status'] ?? null)) {
$failures[] = $file->getRelativePath();
continue 2;
switch ($check['status'] ?? null) {
case 'FAILURE':
$failures[] = $file->getRelativePath();
break;
case 'SUCCESS':
++$passed;
break;
default:
continue 2;
}
}
++$passed;
++$total;
}
}
$pct = $total > 0 ? (int) round($passed / $total * 100) : 0;