mkoppanen/php-zmq — pull request #44 by phuedx (2011-11-16 23:05:26+00:00)
Title: Add a `private final __clone` method to each of the "ZMQContext", "ZMQSocket", "ZMQPoll", and "ZMQDevice" classes.

The `ZMQContext`, `ZMQSocket`, `ZMQPoll`, and `ZMQDevice` classes do not have explicitly defined `#__clone` methods, which means that all of those objects are "cloneable" by default. However, if I attempt to clone an instance of any of the `ZMQ*` objects then a fatal error occurs, which is inconsistent with the definition of the objects.

I've added the `__clone` method to all of the classes mentioned above and made all of them both **private** and **final**.

Moreover, all of the classes mentioned above can now be mocked, without fail, in *PHPUnit*.