WP Maintenance update breaking the layout?

Just confirming, you don’t need the end code there.

Practical note: As this is a temporary piece of code to turn off ssl checks in your local environment and to save you going to all of this trouble to add an unnecessary functions.php for one line of code, I recommend doing the code snippets method of adding the code instead:

This way when you put your site live, you can simply deactivate the snippet.