Vote Details for "Net_Gearman" by gauthierm

» Details
  • Voter: Michael Gauthier 
  • Vote: +1 (conditional)
  • Reviews: Cursory source review
» Comment
in Net_Gearman_Connection
- $multiByteSupport should be private static instead of public
- documentation of connect() says it populates the static $magic array but it actually happens in immediately executable code after the class definition. Could the initialization of the $magic array happen lazily like the static $multiByteSupport member variable? That way both the commands and magic properties could also be private. Initilization could be done with a private static method and reused in the other Connection methods.
- documentation of magic refers to non-existent constructor
- connect() method refers to non-existent $socket member variable
- connect() documentation says it returns void but it really returns a socket resource
- this may not be applicable to Gearman but you should be able to specify the port in the connect() method
- @throws documentation should say why an exception would be thrown