Generally, all discerning developers are trying to secure the input of all public methods (casting, legalization, cleaning etc. for proper type).
My question is: Are the parameters passed in your code protected / private way too valid? In my opinion, it is not necessary that if you safeguard the proper standards of public methods and secure outside prices (other classes, DB, user input etc.) But I am continuously facing frameworks and applications (i.e., the penache for a name) where the method method is often repeated in the verification call, and to save the returned value once again - which I think, The work is making overhead and this is also a sign of poor design.
If you follow the opinion that public APIs should be implemented, those who protect themselves from bad parameters, then you should not have a benchmark. Visibility of the methods, but is the user of the API going to call that method directly (or indirectly called it by somebody who stops verification).Examples of methods that should be verified:
class A {protected final work myMethodDefaultImplementation (...) {/ * subclasses can implement your method To call this method * / / * should verify / ...} the protected summary myMethod (...); Public function orderbird () {$ $ -> $ - ORDER_BY_DATE}} Returns ($ crit) by private function order {/ * should verify / / ...}}