icheishvili/hurricane — Issue #2: PHP file structure, standards
Author: breerly
Created: 2012-02-21 20:44:45+00:00
State: open

The implementation looks rather solid - I think brushing up the structure to be more up to par with popular PHP code standards ([PEAR Coding Standards](http://pear.php.net/manual/en/standards.php), [PHP Autoloading Guidelines](http://php.net/manual/en/language.oop5.autoload.php), [Symfony2 Code Standards](http://symfony.com/doc/2.0/contributing/code/standards.html), [Lithium Coding Standards](http://rad-dev.org/lithium/wiki/standards/coding), [Zend Framework Coding Standards](http://framework.zend.com/manual/en/coding-standard.html)) will improve PHP community adoption and allow for better unit-testing, autoloading, and inclusion in popular package managers like Pear(pyrus) and Composer (packagist.org).

The changes would be rather minor, simply breaking the classes into something like so would be a good first go:

```
drivers/php/src/Hurricane/ErlangCodec/Exception.php
drivers/php/src/Hurricane/ErlangCodec/StreamInterface.php // maybe Streamable would be better
drivers/php/src/Hurricane/ErlangCodec/StreamEmulator.php
drivers/php/src/Hurricane/ErlangCodec/StdioWrapper.php
drivers/php/src/Hurricane/ErlangCodec/SocketWrapper.php
drivers/php/src/Hurricane/ErlangCodec/Serializable.php
drivers/php/src/Hurricane/ErlangCodec/AtomCacheRef.php
drivers/php/src/Hurricane/ErlangCodec/Atom.php
drivers/php/src/Hurricane/ErlangCodec/Reference.php
drivers/php/src/Hurricane/ErlangCodec/Port.php
drivers/php/src/Hurricane/ErlangCodec/Pid.php
drivers/php/src/Hurricane/ErlangCodec/Tuple.php
drivers/php/src/Hurricane/ErlangCodec/Binary.php
drivers/php/src/Hurricane/ErlangCodec/NewReference.php
drivers/php/src/Hurricane/ErlangCodec/NewFunction.php
drivers/php/src/Hurricane/ErlangCodec/Export.php
drivers/php/src/Hurricane/ErlangCodec/ErlFunction.php
drivers/php/src/Hurricane/ErlangCodec/BitBinary.php
drivers/php/src/Hurricane/ErlangCodec/functions.php // should be moved to static Util.php (class)
drivers/php/src/Hurricane/ErlangCodec/Gateway.php
drivers/php/src/Hurricane/Message
drivers/php/src/Hurricane/Gateway
```

I'll submit a pull request when I have time :)