title: When to refactor a method
body: <p>This is intended to be more of a discussion than an outright question, hence I've made it community wiki. 
  When do you choose to break a method into smaller methods. </p>
  
  <p>Say I have a method that has one purpose, i.e. to load a configuration file</p>
  
  <pre><code>public function configure($file){
      $info = path_info(file);
      $ext = $info['extension'];
  
      switch($ext){
      case 'ini':
      //code to parse ini files
      break;
  
      case 'xml':
      //code to parse xml files
      break;
  
      case 'php':
      //code to parse php files
      break;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>personally, I'd break out to internal methods depending on the outcome of the switch - but say I have a more sequential method, a series of steps - i.e.</p>
  
  <pre><code>public function doSequence(){
      $stepOne = //some database access to retrieve values
      $stepTwo = //the result of some interpretation of values
      $stepThree = //a fresh database interaction based on the interpreted values
      $stepFour = //prep values for return
      return $values
  }
  </code></pre>
  
  <p>So, what is your guiding principle for refactoring methods into the appropriate level of granularity?</p>