devfsa / overflow-news

📚 Don't waste time searching for good dev blog posts. Get the latest news here.
https://overflow.news
34 stars 3 forks source link

[CodeQuality] Sanity checks #13

Open di3goleite opened 6 years ago

di3goleite commented 6 years ago

For the most part, sanity checks are put into the code to ensure there are no bugs. For this reason, guaranteeing sanity checks are done correctly becomes necessary. If you do not check to see if the data is valid, and it is invalid, then you're going to allow invalid data to proceed. Here, I'm going to discuss how I think we should do sanity checking in PHP.

Reference: https://dev.to/icambridge/code-review-sanity-checks