We can move the `$dsn` assignment out of the `switch` block. Also, if there's are just two cases at this point, why not just use `if`/`else`?