getRealPath(); if (! is_string($realPath)) { continue; } $contents = File::get($realPath); if (! str_contains($contents, 'Filament::setTenant(')) { continue; } if (! in_array($realPath, $allowlist, true)) { $violations[] = str_replace(base_path().DIRECTORY_SEPARATOR, '', $realPath); } } if ($violations !== []) { test()->fail("Unexpected Filament::setTenant usage detected:\n- ".implode("\n- ", $violations)); } expect($violations)->toBeEmpty(); });