Passing booleans to a method can be code smell, as it is not clear what a boolean does by reading the calling code. Instead of using a temporary variable, you could also use PHP 8's named arguments.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.