title: What is the purpose or wrapping a protected function with a public one which does the same thing?
body: <p>I have a some legacy code which I am currently looking to cut down and make usable in a new project. I've come across the following class with lots of protected methods which perform the intended functionality but they are accessed via a public method which just wraps them like so:</p>
  
  <pre><code>/**
   * method used to perform a fetch both using passed in SQL and optional params
   * @param string - SQL to be executed
   * @param array - optional - used if the query is to be prepared
   * @return mixed - false on failure or array on success
  **/
  protected function _fetcharray($sql, $params = [])
  {
      //execute the query and return the results  
      return $this-&gt;execute($sql, $params)-&gt;fetch(PDO::FETCH_BOTH);
  }
  
  /**
   * Public implementeation of __fetcharray
   * @param string - SQL to be executed
   * @param array - optional - used if the query is to be prepared
   * @return mixed - false on failure or array on success
   **/
  public function fetcharray($sql, $params = [])
  {
      //execute the query and return the results
      return $this-&gt;_fetcharray($sql, $params);
  }
  </code></pre>
  
  <p>I can understand that it might be necessary to do somethings  privately which you would not want to expose publicly but considering one function just calls the other what is the point of this. i.e what am I missing here?</p>