Closed juliangut closed 4 years ago
Please squash
I care more about the quality than the size of the code, especially when it comes to server-side code. Assertions are a powerful mechanism that greatly facilitates input validation. Until we have them built into the language, I use assertion libraries such as beberlei/assert
or webmozart/assert
.
beberlei/assert is 208KB for two checks and raising \InvalidArgumentException (with some extra data that will hardly ever be used)
Just check lower limit and raise native php exceptions