hm2k/Services_Mailman — pull request #7 by till (2012-01-25 00:27:08+00:00)
Title: Fixed some cs for you and showed you how to simplify some if/else/elseif...

... constructs. Please run PHP_CodeSniffer (aka phpcs) as others have suggested.

I simplified your your setRequest() method heavily, take a look – less code. And it works.

I don't know why you didn't create a "Services_Mailman_Exception" class to make catching exceptions from your package easier. That would be especially useful if your code is used within other code. It's as simple as "class Services_Mailman_Exception extends Exception {}" in a new Exception file.

Reading your code with all the regexp, etc. – my opinion is that it's just bound to break sooner or later. A DOM-based selector would be a lot better. I'm not sure why you insist to use regexp. Your array_merge(), array_pop(), etc. is pretty unreadable. I just hope I never have to hunt a bug in this package. That's also a reason why I'd appreciate something DOM-based.