[Network] Move error information methods into dedicated trait

Review Request #50 — Created Feb. 10, 2013 and submitted

pprkut
Lunr
master
lunr
The Curl and the StreamSocketClient class share the code for retrieving error messages and numbers. With Lunr now depending on PHP 5.4 we can externalize that into a trait which is shared by both.
Unit Tests
  • 1
  • 0
  • 0
  • 0
  • 1
Description From Last Updated
Is it useful to have such a function when there is only one specific attribute "meta_data", to which we can ... dinos dinos
dinos
  1. 
      
  2. src/Lunr/Network/StreamSocket.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Is it useful to have such a function when there is only one specific attribute "meta_data", to which we can get access?
    1. what would you propose instead? We could replace it with a getter, but that would have a different flow, since that would be accessed as a function. I'm not saying that would be bad, just different.
    2. Yes I was thinking of a getter. Simple and stupid :), but of course you know better what a consequences a small change might have to the whole code. I guess it's up to you :)
      Further than this it's a "ship it" from me.
    3. I'm fine with making it a getter, but it's somewhat outside of the scope of this change. Feel free to change it :)
      Olivier wrote the initial implementation. If you have questions about the reasoning it's best to ask him.
  3. 
      
dinos
  1. Ship It!
  2. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master
Loading...