Modernize ident_switch.php for PHP 8.2+ and Roundcube 1.6+

- Add docblocks to all classes, methods, and constants
- Add type declarations to all parameters and return types
- Add visibility modifiers to all methods and constants
- Use PHP 8.0+ syntax: match expression, named arguments,
  str_contains(), str_starts_with(), str_ends_with()
- Replace array() with short array syntax []
- Use null coalescing operator ?? instead of isset ternaries
- Use early returns instead of deeply nested if/else
- Remove Roundcube < 1.6 compatibility code (smtp_server/smtp_port)
- Fix unreferenced $config variable in on_switch default restore
- Use union type array|false for get_preconfig return
This commit is contained in:
Laurent Dinclaux
2026-02-10 09:55:26 +11:00
parent 8b9447fc63
commit 85ed8815f1

File diff suppressed because it is too large Load Diff