Maybe collect the rules in an array $rules and then implode it? This would make the intent behind the code more clear to the reader.