qandidate-labs/broadway — pull request #35 by Miliooo (2014-09-04 15:57:25+00:00)
Title: CommandHandler avoid endless loop

Background:
I was checking if commands needed to implement a certain interface. Even if it was only an empty one. This should at least force them to be objects.
https://github.com/qandidate-labs/broadway/blob/master/src/Broadway/CommandHandling/CommandHandlerInterface.php
Turned out that wasn't the case. So I wanted to see what would happen if I send a string as a command.

Keep in mind though i'm testing this in pure php with the command line.
I expected an exception somewhere but I ended up in an endless loop.

If you check the code the get_class command did return an warning (but no exception), neither did the explode function.
This caused me to endlessly loop the method handle.
This pull request fixed that behaviour.