title: When to validate/sanitize the arguments of an overridden method?
body: <p>What can you tell about validating/sanitizing the arguments of a overridden method in a class?</p>
  
  <p>If I have something like</p>
  
  <pre><code>class parentClass
  {
      public function originalMethod($id) {
          if(is_numeric($id) &amp;&amp; (int) $id &gt; 0) {
              // use $id
          }
      }
  }
  </code></pre>
  
  <p>and a subclass that overrides the method</p>
  
  <pre><code>class childClass extends parentClass
  {
      public function originalMethod($id) {
  
          parent::originalMethod($id);
  
          // do other stuff 
      }
  }
  </code></pre>
  
  <p>My question is:</p>
  
  <p><em><strong>in which cases would you proceed with a validation of the method's arguments?</strong></em></p>
  
  <p>Shouldn't I expect/assume that the right validation has already performed in the parent method?</p>
  
  <p>I've seen sometime code where the validation is performed again (not in a simple case like the one above).</p>
  
  <p>Would you validate each time? Never? Just under some circumstances?</p>