Isn't `text` the output format.  As far as I understand, it is not at all related to the rulesets, and should definitely not be part of the ruleset option.

In fact, I think, you can't really use `option` here.  It serves a different purpose.  

Instead, just use `text (eval (flycheck-comma-separated-list flycheck-phpmd-rulesets))`.