Thanks for the PR.
I don't think you can assume everyone is using
Thankfully since PHP 5.4 there is a function for this:
Or maybe use the exiting helper function:
@tsteur Is there any reason why there is a custom function?
Looking at the content of the method it definitely seems like there's a reason fir it by the looks. But maybe
http_response_code() was never used and that's why it was needed. Not sure.
Changed to use http_response_code