fix: resolve all quality gate failures — i18n key, typography tokens, PHPStan errors, style
- Add missing i18n key "LDAP attribute map could not be encoded" (de+en) - Replace raw font-weight/line-height with design tokens in app-topbar.css - Fix import ordering in SchedulerRunService.php (php-cs-fixer) - Fix PHPStan mock chain errors in DebitorDetailServiceTest and TenantSsoServiceTest (PHPUnit 12 API) - Simplify redundant comparison in NotificationService dedupe window - Add PHPStan type hint for mock callback array in SchedulerJobFailedNotificationListenerTest - Fix undefined variable and add flow-analysis suppression in login().php - Increase dev PHP memory_limit to 1G for PHPStan (prod stays 256M) All 6 quality gates now pass: QG-001 (1618 tests), QG-002 (0 errors), QG-003 (6630 assertions), QG-006 (0 fixable), QG-008, QG-009. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -88,14 +88,14 @@ $resolveLoginCandidates = static function (string $inputEmail) use ($userReadRep
|
||||
$isKnownActiveUser = $user && (int) ($user['active'] ?? 0) === 1 && (int) ($user['id'] ?? 0) > 0;
|
||||
|
||||
$tenants = [];
|
||||
$discovery = false;
|
||||
|
||||
if ($isKnownActiveUser) {
|
||||
$userId = (int) $user['id'];
|
||||
$tenants = $userTenantContextService->getAssignedActiveTenants($userId);
|
||||
}
|
||||
|
||||
// Fallback: domain-based SSO discovery for users not yet provisioned locally
|
||||
$discovery = false;
|
||||
$discoveryMethodsByTenantId = [];
|
||||
if (!$tenants) {
|
||||
$discoveryResults = $tenantSsoService->discoverTenantsByEmailDomain($emailValue);
|
||||
if (!$discoveryResults) {
|
||||
@@ -103,7 +103,6 @@ $resolveLoginCandidates = static function (string $inputEmail) use ($userReadRep
|
||||
}
|
||||
$discovery = true;
|
||||
$tenants = array_map(static fn (array $r): array => $r['tenant'], $discoveryResults);
|
||||
$discoveryMethodsByTenantId = [];
|
||||
foreach ($discoveryResults as $r) {
|
||||
$discoveryMethodsByTenantId[(int) $r['id']] = $r['methods'];
|
||||
}
|
||||
@@ -120,6 +119,7 @@ $resolveLoginCandidates = static function (string $inputEmail) use ($userReadRep
|
||||
if ($tenantSlug === '') {
|
||||
continue;
|
||||
}
|
||||
/** @phpstan-ignore ternary.alwaysFalse ($discovery is set to true inside the !$tenants branch that also reassigns $tenants) */
|
||||
$methods = $discovery
|
||||
? ($discoveryMethodsByTenantId[$tenantId] ?? ['local' => false, 'microsoft' => false, 'microsoft_reason' => '', 'ldap' => false, 'ldap_reason' => ''])
|
||||
: $tenantSsoService->resolveTenantLoginMethods($tenantId);
|
||||
|
||||
Reference in New Issue
Block a user