title: Using method return value as argument vs setting class variable in one method and using it as an argument of another
body: <p>I was wondering what are the pros and cons of these 2 programming styles, is it just a matter of taste or is one the desired way?</p>
  
  <p>using a method return value as an argument for another method :</p>
  
  <pre><code>public function add($data) 
  {
      $this-&gt;uploadFilesToPreflight(
          $this-&gt;addOrderFilesToDB(
              $data['shop'],
              $data['filesData']
          )
      );
  }
  </code></pre>
  
  <p>VS setting a protected class variable in method 1 and using it as method 2 argument:</p>
  
  <pre><code>public function add($data) 
  {
      //does some stuff and sets $orderFilesArray
      $this-&gt;addOrderFilesToDB($data['shop'], $data['filesData']);
  
      $this-&gt;uploadFilesToPreflight($this-&gt;orderFilesArray);
  }
  </code></pre>