Run Rector on your code to see what it can do for you:

 <?php
 
 namespace Domains\Calculator\Exceptions;
 
 use Exception;
 
-class EmailException extends Exception
-{
-    public function __construct($message = 'Email not sent.', ...$args)
-    {
-        parent::__construct($message, ...$args);
-    }
+class EmailException extends Exception
+{
 }
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 461c9c - released at 2026-02-20 18:44