Thank you for your contribution. I really like when someone improves someone's code, it is helpful for the people using it as well as for maintaining it. The post could have been improved a little bit without writing everything in the code block but if you would have used Carbon. The code looks good and a nice contribution.
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.